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>
Unification of tty_shutdown() function as for S-Lang as for NCurses.
Added do_exit_ca_mode() call to the NCurses-based tty_shutdown().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The xterm_flag variable was initialized in setup_mc() but used
first time in init_key() and in tty_init() (in do_enter_ca_mode())
before setup_mc() call.
Now xterm initialized in early step of mc start up process and
xterm support and mouse are initialized in tty_init().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
... to avoid artefacts after printing of non-printable symbols.
(tty_touch_lines): new function to mark modified lines of screen.
(do_refresh): mark lines as modified before redraw of non-fullscreen dialog
and clear entire screen before redraw of fullscreen dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The problem:
viewing binary files contain char 0x9A leads to massive screen corruption and Search
dialog pops up with 1;2c search string (multiple times depending on actual screen contents).
So it looks like the file 'presses' F7 or / and shift-right_arrow for every specified
character combination occurrence. In case of bigger files it's impossible to exit from
such viewer, as search dialog keeps popping up after closing.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* Restored old behaviour of A_BLINK attribute (intensity of background color instead of blinking foreground color);
* Added function tty_use_256colors() for determine terminals with 256colors support;
* Fixed background highlighting in NCurses and S-Lang.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Forget the old limit of 8 background and 16 foreground colors.
From now on Midnight Commander can use all the 256 colors,
as your favorite terminal emulator supports them - or not,
in which case it's not going to stay your favorite terminal for long.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Fixed tty_print_alt_char() to draw single or double vertical
or horizintal lines.
Added argument to tty_print_one_hline() and tty_print_one_vline()
functions to draw single or double lines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Generally, Ctrl-\ is a default assignment to SIGQUIT signal.
S-Lang breaks this assignment. NCurses doesn't, therefore
MC just quits when user presses the Ctrl-\ key.
This commit emulates the S-Lang way in NCurses-based MC.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* moved src/global.h into lib/global.h
* moved glibcompat.[ch] from ./src/ into ./lib/
* moved fs.h from ./src/ into ./lib/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>