Ticket #4011 (new defect)

Opened 5 years ago

Last modified 5 years ago

when mc is in "ascii" mode it still launches mcedit in extended mode

Reported by: jetpilot Owned by:
Priority: major Milestone: Future Releases
Component: mcedit Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

on a SSH connection (identified by e.g. SSH_CLIENT variable beeing set to some IP) i have to use the "-a" option on mc for a useable window and dialog layout. easy to do that using a shell script or maybe less smarter with an alias.

when now launching mcedit via the "F4" edit key from mc i am still getting into an instance of mcedit that is using the extended character set. attempts to improve the situation with alias or helper scripts failed so far for me. shouldn't an mc instance that is in ascii mode also prefer to launch mcedit in ascii mode as well. other than that i dont even see a was to pre-select ascii mode for mcedit.

the problem is not instantly visible in mcedit as its main screen avoids using any extended chars but as soon as i open a dialog its corrupting the screen contents in a way that stays longer than the dialog is open.

Change History

comment:1 Changed 5 years ago by jetpilot

it seems that default distributions like xenial have some method for selecting a default editor for each user environment. on first "F4" press the user has to chose. this seems to be an _external_ feature and thus the mode mc is used here is "external editor" mode.

pressing F9->Options->Configuration and selecting "Use internal edit"(t) from the right pane ("Other options") will select the internal editor mode. trying out editing with F4 afterwards seems to work very well.

rationale: external editors might be referenced by absolute paths.

see also: ~/.selected-editor
contents are e.g.

# Generated by /usr/bin/select-editor
SELECTED_EDITOR="/usr/bin/mcedit"

changing this to the following had as well sort of a curing effect:

# Generated by /usr/bin/select-editor
SELECTED_EDITOR="/usr/bin/mcedit -a"

comment:2 Changed 5 years ago by jetpilot

if mc is aware of the binary to launch it should be able to detect that mcedit is configured as an external editor and thus it could add the "-a" option if mc itself runs in "-a" mode. hard to say if that shall be done automatically or by a one time query (leading to one more option). its at least possible to add such a behavior in order to avoid such known-to-break screen layout during editing.

Note: See TracTickets for help on using tickets.