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>
Этот коммит содержится в:
родитель
8f92ba1fcb
Коммит
795b3a76f0
@ -42,6 +42,7 @@
|
||||
|
||||
#include "lib/global.h"
|
||||
#include "lib/strutil.h" /* str_term_form */
|
||||
#include "lib/util.h" /* is_printable() */
|
||||
|
||||
#include "tty-internal.h" /* slow_tty */
|
||||
#include "tty.h"
|
||||
@ -630,6 +631,8 @@ tty_print_anychar (int c)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!is_printable (c))
|
||||
c = '.';
|
||||
SLsmg_write_char ((SLwchar_Type) ((unsigned int) c));
|
||||
}
|
||||
}
|
||||
|
@ -746,6 +746,15 @@ init_xterm_support (void)
|
||||
{
|
||||
xterm_flag = 1;
|
||||
|
||||
#ifdef HAVE_SLANG
|
||||
/* For 8-bit locales, NCurses handles 154 (0x9A) symbol properly, while S-Lang
|
||||
* requires SLsmg_Display_Eight_Bit >= 154 (OR manual filtering if xterm display
|
||||
* detected - but checking TERM would fail under screen, OR running xterm
|
||||
* with allowC1Printable).
|
||||
*/
|
||||
tty_display_8bit (FALSE);
|
||||
#endif
|
||||
|
||||
/* Default to the standard xterm sequence */
|
||||
if (!xmouse_seq)
|
||||
{
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user