mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Ticket #2964: mouse doesn't select text in subshell in native console.
Steps to Reproduce:
1. Run mc in native console (not in X terminal emulator).
2. Press Ctrl+O to switch to subshell.
3. Try select anything with mouse.
Result: mouse does't select anything.
This bug was introduced in 68468a25ac
commit.
Solution: make mouse initialization after initializaton of subshell.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
9c8c16bfd0
commit
a11628da62
@ -203,7 +203,6 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
|
||||
if (!mouse_enable)
|
||||
use_mouse_p = MOUSE_DISABLED;
|
||||
tty_init_xterm_support (is_xterm); /* do it before do_enter_ca_mode() call */
|
||||
init_mouse ();
|
||||
do_enter_ca_mode ();
|
||||
tty_raw_mode ();
|
||||
noecho ();
|
||||
|
@ -332,7 +332,6 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
|
||||
if (!mouse_enable)
|
||||
use_mouse_p = MOUSE_DISABLED;
|
||||
tty_init_xterm_support (is_xterm); /* do it before do_enter_ca_mode() call */
|
||||
init_mouse ();
|
||||
do_enter_ca_mode ();
|
||||
tty_keypad (TRUE);
|
||||
tty_nodelay (FALSE);
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "lib/event.h"
|
||||
#include "lib/tty/tty.h"
|
||||
#include "lib/tty/key.h" /* For init_key() */
|
||||
#include "lib/tty/mouse.h" /* init_mouse() */
|
||||
#include "lib/skin.h"
|
||||
#include "lib/filehighlight.h"
|
||||
#include "lib/fileloc.h"
|
||||
@ -367,7 +368,6 @@ main (int argc, char *argv[])
|
||||
/* inherit the file descriptors opened below, etc */
|
||||
if (mc_global.tty.use_subshell)
|
||||
init_subshell ();
|
||||
|
||||
#endif /* ENABLE_SUBSHELL */
|
||||
|
||||
/* Also done after init_subshell, to save any shell init file messages */
|
||||
@ -377,6 +377,10 @@ main (int argc, char *argv[])
|
||||
if (mc_global.tty.alternate_plus_minus)
|
||||
application_keypad_mode ();
|
||||
|
||||
/* Done after subshell initialization to allow select and paste text by mouse
|
||||
w/o Shift button in subshell in the native console */
|
||||
init_mouse ();
|
||||
|
||||
/* subshell_prompt is NULL here */
|
||||
mc_prompt = (geteuid () == 0) ? "# " : "$ ";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user