add utf8_display global variable, if display bits select utf-8 utf8_display = 1
Этот коммит содержится в:
родитель
d4148989ed
Коммит
df1d805b44
@ -569,7 +569,8 @@ sel_charset_button (int action)
|
||||
cpname = (new_display_codepage < 0)
|
||||
? _("Other 8 bit")
|
||||
: codepages[new_display_codepage].name;
|
||||
|
||||
if ( cpname )
|
||||
utf8_display = str_isutf8 (cpname);
|
||||
/* avoid strange bug with label repainting */
|
||||
g_snprintf (buf, sizeof (buf), "%-27s", cpname);
|
||||
label_set_text (cplabel, buf);
|
||||
|
@ -152,8 +152,16 @@ int eight_bit_clean = 1;
|
||||
* This is reported to break on many terminals (xterm, qansi-m).
|
||||
*/
|
||||
int full_eight_bits = 0;
|
||||
|
||||
#endif /* !HAVE_CHARSET */
|
||||
|
||||
/*
|
||||
* If utf-8 terminal utf8_display = 1
|
||||
* Display bits set UTF-8
|
||||
*
|
||||
*/
|
||||
int utf8_display = 0;
|
||||
|
||||
/* If true use the internal viewer */
|
||||
int use_internal_view = 1;
|
||||
|
||||
|
@ -50,6 +50,7 @@ struct edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO];
|
||||
#ifdef HAVE_CHARSET
|
||||
extern int source_codepage;
|
||||
extern int display_codepage;
|
||||
extern int utf8_display;
|
||||
#else
|
||||
extern int eight_bit_clean;
|
||||
extern int full_eight_bits;
|
||||
|
@ -59,6 +59,8 @@
|
||||
# include "../edit/edit.h"
|
||||
#endif
|
||||
|
||||
#include "../src/strutil.h" /* str_isutf8 () */
|
||||
|
||||
|
||||
extern char *find_ignore_dirs;
|
||||
|
||||
@ -589,6 +591,8 @@ load_setup (void)
|
||||
source_codepage = get_codepage_index( cpname );
|
||||
}
|
||||
init_translation_table( source_codepage, display_codepage );
|
||||
if ( get_codepage_id( display_codepage ) )
|
||||
utf8_display = str_isutf8 (get_codepage_id( display_codepage ));
|
||||
#endif /* HAVE_CHARSET */
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user