Commit Graph

48 Commits

Author SHA1 Message Date
Yuri Khan
968882335a Do not botch SIGWINCH delivery to the subshell.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-28 09:34:11 +03:00
Andrew Borodin
3204563bff Move definition of reset_hp_softkeys variable to lib/tty/tty-slang.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:28:47 +03:00
Andrew Borodin
ccad69bccf Clarify type cast in SLtt_tgetsrt() calls.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Yuri Khan
c1975a3a35 Do not duplicate alternate screen switching.
S-Lang already handles that in SLsmg_init_smg() and SLsmg_reset_smg().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 10:01:13 +03:00
Yuri Khan
abb4996589 Ticket #3640: Subshell cursor position lost after window resizing.
Refactoring: rename functions:

do_enter_ca_mode -> tty_enter_ca_mode
do_exit_ca_mode -> tty_exit_ca_mode

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 10:01:13 +03:00
Andrew Borodin
471ea781ca Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andreas Mohr
ca95dec659 Ticket #3428: fix -Wredundant-decls compiler warnings...
...and use compiler option for future compile checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andrew Borodin
454479549c Update copyright years. 2015-02-26 09:12:08 +03:00
Egmont Koblinger
5943929956 Ticket #3183: diffviewer line drawing fix.
The "topmiddle" and "bottommiddle" characters are defined incorrectly
in many skins. This is because the correct definition wouldn't work
with S-Lang build. The only place these characters are used is the
diffviewer if either the +/- signs or the line numbers are shown,
enabled by pressing S or L. The correct definition of these characters
currently show up as 'v' and 'w' characters.

The fix makes the diffviewer use tty_print_alt_char() as it is being used
in other parts of the code, and hence it fixes the bug.
It also fixes the skin definitions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-03-16 17:02:46 +04:00
Andrew Borodin
e5203cb023 Fix name of FSF in all *.c files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin
f0da49345a Collapse list of copyright years to ranges. Add 2014 year.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Slava Zanko
0d489acd58 cppcheck: reduce variable scope.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
a3b8a2f005 Use UTF8_CHAR_LEN instead of a magic number
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Andrew Borodin
6a05f30ecf Clarify usage of SA_RESTART.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Egmont Koblinger
8f35c90b94 Ticket #2661: support enable bracketed paste of xterm.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 11:41:58 +04:00
Andrew Borodin
a11628da62 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>
2013-02-14 14:26:25 +04:00
Andrew Borodin
82bb9c39da Define winch_flag as volatile sig_atomic_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
794145090d Fixups of SIGWINCH handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
ea2c57dbd6 Optimization of SIGWINCH handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:06 +04:00
Andrew Borodin
62fc80f5f7 Allow draw a part of line if some coordinares are out of screen boundaries.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Slava Zanko
0138645541 Ticket 1551: Update GPL version from 2 to 3
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Andrew Borodin
6c5a679b85 Use ESC_STR macro instead of hardcoded "\033".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Slava Zanko
70ff1dc3aa Removed mc_global.args structure.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
bfbe9b94ae Removed global variable slow_tty
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
9d9935d290 Removed global variable ugly_line_drawing
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Andrew Borodin
387bad2c7e Move SIGWINCH handler initialization to tty_init()
... and rename tty_low_level_change_screen_size() to
tty_change_screen_size().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:11:51 +04:00
Andrew Borodin
09123c9fc9 Refactoring of TTY layer shutdown.
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>
2011-09-08 14:10:58 +04:00
Andrew Borodin
68468a25ac Ticket #2601: incorrect TTY layer initialization.
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>
2011-09-08 14:10:51 +04:00
Andrew Borodin
17033652ee Revert "Ticket #2453: aggressive screen repaint"
This reverts commit f809e6cf7a.

While navigating in main menu (from one submenu to another one)
or after closing a dialog, the screen is blinking.
2011-07-09 20:39:46 +04:00
Andrew Borodin
f809e6cf7a Ticket #2453: aggressive screen repaint
... 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>
2011-07-08 13:51:41 +04:00
Andrew Borodin
0bdbd6c608 Fixup of S-Lang initialization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-01 15:24:44 +03:00
GoTaR
795b3a76f0 Ticket #1668: Screen and input corruption under xterm [non-UTF]
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>
2011-03-01 15:24:38 +03:00
Slava Zanko
3def2733dd Use constant for describe color intensity
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-24 15:46:10 +02:00
Slava Zanko
26b0623e87 Ticket #2169: Colors fixups for backward compability
* 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>
2011-01-24 15:45:58 +02:00
Egmont Koblinger
e593572bb9 Ticket #2169: Add support for 256 colors terminals
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>
2010-12-29 11:58:10 +02:00
Andrew Borodin
9b43d71799 Set SLtt_Ignore_Beep in tty_init().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Slava Zanko
feb733663f Code indentation in lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:20 +03:00
Vit Rosin
993d678ed9 Use EXIT_FAILURE symbolic name as return code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
a708b5c514 Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-06 11:16:11 +04:00
Andrew Borodin
4e57b599cc Renamed frame symbol names.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-06 10:30:58 +04:00
Andrew Borodin
9a145a88ce Added capability to draw single or double lines.
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>
2010-04-06 10:30:58 +04:00
Sergei E. Ovsyannikov
d8fb069e85 Ticket #1648: implemented single-line boxes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-06 10:30:58 +04:00
Andrew Borodin
56bf77ae57 Ticket #1926: Ctrl-\ key behaviour in NCurses-based MC.
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>
2010-02-06 13:21:25 +03:00
Slava Zanko
cd4dbf3a09 Changes for build after moving strutil into lib
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:24 +02:00
Slava Zanko
93dbc46e9c Reorganization of sources. Part 1.
* 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>
2010-01-26 10:30:23 +02:00
Slava Zanko
39d5b94cac Reorganized pathes to files in '#include' directives 2010-01-26 10:30:22 +02:00
Slava Zanko
ddb9ada2e8 Changes in sources matched with mass movement of $(srcdir)/src/*/ into $(srcdir)/lib/*/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:22 +02:00
Slava Zanko
4f11e4b665 Massive moved some dirs from $(srcdir)/src into $(srcdir)/lib
Moved subdirs:
 * filehighlight
 * mcconfig
 * search
 * skin
 * tty

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:22 +02:00