4343 * - add test for giving error for invalid 'termsize' value.
4444 * - support minimal size when 'termsize' is "rows*cols".
4545 * - support minimal size when 'termsize' is empty?
46+ * - do not set bufhidden to "hide"? works like a buffer with changes.
47+ * document that CTRL-W :hide can be used.
48+ * - command argument with spaces doesn't work #1999
49+ * :terminal ls dir\ with\ spaces
4650 * - implement job options when starting a terminal. Allow:
4751 * "in_io", "in_top", "in_bot", "in_name", "in_buf"
4852 "out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
5963 * mouse in the Terminal window for copy/paste.
6064 * - when 'encoding' is not utf-8, or the job is using another encoding, setup
6165 * conversions.
62- * - update ":help function-list" for terminal functions.
6366 * - In the GUI use a terminal emulator for :!cmd.
6467 * - Copy text in the vterm to the Vim buffer once in a while, so that
6568 * completion works.
@@ -850,7 +853,7 @@ add_scrollback_line_to_buffer(term_T *term, char_u *text, int len)
850853 int empty = (buf -> b_ml .ml_flags & ML_EMPTY );
851854 linenr_T lnum = buf -> b_ml .ml_line_count ;
852855
853- #ifdef _WIN32
856+ #ifdef WIN3264
854857 if (!enc_utf8 && enc_codepage > 0 )
855858 {
856859 WCHAR * ret = NULL ;
@@ -1300,7 +1303,7 @@ term_get_cursor_shape(guicolor_T *fg, guicolor_T *bg)
13001303 {
13011304 entry .blinkwait = 700 ;
13021305 entry .blinkon = 400 ;
1303- entry .blinkon = 250 ;
1306+ entry .blinkoff = 250 ;
13041307 }
13051308 * fg = gui .back_pixel ;
13061309 if (term -> tl_cursor_color == NULL )
@@ -1492,7 +1495,7 @@ terminal_loop(void)
14921495 goto theend ;
14931496 }
14941497 }
1495- # ifdef _WIN32
1498+ # ifdef WIN3264
14961499 if (!enc_utf8 && has_mbyte && c >= 0x80 )
14971500 {
14981501 WCHAR wc ;
@@ -2104,14 +2107,11 @@ term_update_window(win_T *wp)
21042107 if (c == NUL )
21052108 {
21062109 ScreenLines [off ] = ' ' ;
2107- #if defined(FEAT_MBYTE )
21082110 if (enc_utf8 )
21092111 ScreenLinesUC [off ] = NUL ;
2110- #endif
21112112 }
21122113 else
21132114 {
2114- #if defined(FEAT_MBYTE )
21152115 if (enc_utf8 )
21162116 {
21172117 if (c >= 0x80 )
@@ -2125,7 +2125,7 @@ term_update_window(win_T *wp)
21252125 ScreenLinesUC [off ] = NUL ;
21262126 }
21272127 }
2128- # ifdef _WIN32
2128+ #ifdef WIN3264
21292129 else if (has_mbyte && c >= 0x80 )
21302130 {
21312131 char_u mb [MB_MAXBYTES + 1 ];
@@ -2135,15 +2135,14 @@ term_update_window(win_T *wp)
21352135 (char * )mb , 2 , 0 , 0 ) > 1 )
21362136 {
21372137 ScreenLines [off ] = mb [0 ];
2138- ScreenLines [off + 1 ] = mb [1 ];
2138+ ScreenLines [off + 1 ] = mb [1 ];
21392139 cell .width = mb_ptr2cells (mb );
21402140 }
21412141 else
21422142 ScreenLines [off ] = c ;
21432143 }
2144- # endif
2145- else
21462144#endif
2145+ else
21472146 ScreenLines [off ] = c ;
21482147 }
21492148 ScreenAttrs [off ] = cell2attr (cell .attrs , cell .fg , cell .bg );
@@ -2152,12 +2151,14 @@ term_update_window(win_T *wp)
21522151 ++ off ;
21532152 if (cell .width == 2 )
21542153 {
2155- #if defined(FEAT_MBYTE )
21562154 if (enc_utf8 )
21572155 ScreenLinesUC [off ] = NUL ;
2158- else if (!has_mbyte )
2159- #endif
2156+
2157+ /* don't set the second byte to NUL for a DBCS encoding, it
2158+ * has been set above */
2159+ if (enc_utf8 || !has_mbyte )
21602160 ScreenLines [off ] = NUL ;
2161+
21612162 ++ pos .col ;
21622163 ++ off ;
21632164 }
@@ -2268,8 +2269,15 @@ create_vterm(term_T *term, int rows, int cols)
22682269 /* Allow using alternate screen. */
22692270 vterm_screen_enable_altscreen (screen , 1 );
22702271
2271- /* We do not want a blinking cursor by default. */
2272+ /* For unix do not use a blinking cursor. In an xterm this causes the
2273+ * cursor to blink if it's blinking in the xterm.
2274+ * We do want a blinking cursor by default on Windows, since that's what
2275+ * the default is for a console. */
2276+ #ifdef WIN3264
2277+ value .boolean = 1 ;
2278+ #else
22722279 value .boolean = 0 ;
2280+ #endif
22732281 vterm_state_set_termprop (vterm_obtain_state (vterm ),
22742282 VTERM_PROP_CURSORBLINK , & value );
22752283}
0 commit comments