Mercurial > vim
comparison src/terminal.c @ 12202:4e0f699582cf v8.0.0981
patch 8.0.0981: cursor in terminal window blinks by default
commit https://github.com/vim/vim/commit/0cbba82359ff9f061aa65632cec7b6b57ae6d6e7
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 21 21:39:28 2017 +0200
patch 8.0.0981: cursor in terminal window blinks by default
Problem: Cursor in terminal window blinks by default, while in a real xterm
it does not blink, unless the -bc argument is used.
Solution: Do not use a blinking cursor by default.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 21 Aug 2017 21:45:04 +0200 |
parents | 53987de2115d |
children | b49b03085f39 |
comparison
equal
deleted
inserted
replaced
12201:62bfec550bc1 | 12202:4e0f699582cf |
---|---|
36 * that buffer, attributes come from the scrollback buffer tl_scrollback. | 36 * that buffer, attributes come from the scrollback buffer tl_scrollback. |
37 * When the buffer is changed it is turned into a normal buffer, the attributes | 37 * When the buffer is changed it is turned into a normal buffer, the attributes |
38 * in tl_scrollback are no longer used. | 38 * in tl_scrollback are no longer used. |
39 * | 39 * |
40 * TODO: | 40 * TODO: |
41 * - test writing lines to terminal job when implemented for MS-Windows | 41 * - test for writing lines to terminal job does not work on MS-Windows |
42 * - implement term_setsize() | 42 * - implement term_setsize() |
43 * - add test for giving error for invalid 'termsize' value. | 43 * - add test for giving error for invalid 'termsize' value. |
44 * - support minimal size when 'termsize' is "rows*cols". | 44 * - support minimal size when 'termsize' is "rows*cols". |
45 * - support minimal size when 'termsize' is empty? | 45 * - support minimal size when 'termsize' is empty? |
46 * - implement job options when starting a terminal. Allow: | 46 * - implement job options when starting a terminal. Allow: |
2184 static void | 2184 static void |
2185 create_vterm(term_T *term, int rows, int cols) | 2185 create_vterm(term_T *term, int rows, int cols) |
2186 { | 2186 { |
2187 VTerm *vterm; | 2187 VTerm *vterm; |
2188 VTermScreen *screen; | 2188 VTermScreen *screen; |
2189 VTermValue value; | |
2189 | 2190 |
2190 vterm = vterm_new(rows, cols); | 2191 vterm = vterm_new(rows, cols); |
2191 term->tl_vterm = vterm; | 2192 term->tl_vterm = vterm; |
2192 screen = vterm_obtain_screen(vterm); | 2193 screen = vterm_obtain_screen(vterm); |
2193 vterm_screen_set_callbacks(screen, &screen_callbacks, term); | 2194 vterm_screen_set_callbacks(screen, &screen_callbacks, term); |
2208 /* Required to initialize most things. */ | 2209 /* Required to initialize most things. */ |
2209 vterm_screen_reset(screen, 1 /* hard */); | 2210 vterm_screen_reset(screen, 1 /* hard */); |
2210 | 2211 |
2211 /* Allow using alternate screen. */ | 2212 /* Allow using alternate screen. */ |
2212 vterm_screen_enable_altscreen(screen, 1); | 2213 vterm_screen_enable_altscreen(screen, 1); |
2214 | |
2215 /* We do not want a blinking cursor by default. */ | |
2216 value.boolean = 0; | |
2217 vterm_state_set_termprop(vterm_obtain_state(vterm), | |
2218 VTERM_PROP_CURSORBLINK, &value); | |
2213 } | 2219 } |
2214 | 2220 |
2215 /* | 2221 /* |
2216 * Return the text to show for the buffer name and status. | 2222 * Return the text to show for the buffer name and status. |
2217 */ | 2223 */ |