|
36 | 36 | * that buffer, attributes come from the scrollback buffer tl_scrollback. |
37 | 37 | * |
38 | 38 | * TODO: |
| 39 | + * - Use "." for current line instead of optional. |
| 40 | + * - make row and cols one-based instead of zero-based in term_ functions. |
| 41 | + * - Add StatusLineTerm highlighting |
39 | 42 | * - in bash mouse clicks are inserting characters. |
40 | 43 | * - mouse scroll: when over other window, scroll that window. |
41 | 44 | * - For the scrollback buffer store lines in the buffer, only attributes in |
@@ -351,6 +354,8 @@ term_write_job_output(term_T *term, char_u *msg, size_t len) |
351 | 354 | static void |
352 | 355 | update_cursor(term_T *term, int redraw) |
353 | 356 | { |
| 357 | + if (term->tl_terminal_mode) |
| 358 | + return; |
354 | 359 | setcursor(); |
355 | 360 | if (redraw && term->tl_buffer == curbuf) |
356 | 361 | { |
@@ -382,9 +387,12 @@ write_to_term(buf_T *buffer, char_u *msg, channel_T *channel) |
382 | 387 | ch_logn(channel, "writing %d bytes to terminal", (int)len); |
383 | 388 | term_write_job_output(term, msg, len); |
384 | 389 |
|
385 | | - /* TODO: only update once in a while. */ |
386 | | - update_screen(0); |
387 | | - update_cursor(term, TRUE); |
| 390 | + if (!term->tl_terminal_mode) |
| 391 | + { |
| 392 | + /* TODO: only update once in a while. */ |
| 393 | + update_screen(0); |
| 394 | + update_cursor(term, TRUE); |
| 395 | + } |
388 | 396 | } |
389 | 397 |
|
390 | 398 | /* |
@@ -1081,7 +1089,7 @@ handle_movecursor( |
1081 | 1089 | if (wp->w_buffer == term->tl_buffer) |
1082 | 1090 | position_cursor(wp, &pos); |
1083 | 1091 | } |
1084 | | - if (term->tl_buffer == curbuf) |
| 1092 | + if (term->tl_buffer == curbuf && !term->tl_terminal_mode) |
1085 | 1093 | { |
1086 | 1094 | may_toggle_cursor(term); |
1087 | 1095 | update_cursor(term, term->tl_cursor_visible); |
@@ -2009,10 +2017,13 @@ f_term_sendkeys(typval_T *argvars, typval_T *rettv) |
2009 | 2017 | msg += MB_PTR2LEN(msg); |
2010 | 2018 | } |
2011 | 2019 |
|
2012 | | - /* TODO: only update once in a while. */ |
2013 | | - update_screen(0); |
2014 | | - if (buf == curbuf) |
2015 | | - update_cursor(term, TRUE); |
| 2020 | + if (!term->tl_terminal_mode) |
| 2021 | + { |
| 2022 | + /* TODO: only update once in a while. */ |
| 2023 | + update_screen(0); |
| 2024 | + if (buf == curbuf) |
| 2025 | + update_cursor(term, TRUE); |
| 2026 | + } |
2016 | 2027 | } |
2017 | 2028 |
|
2018 | 2029 | /* |
|
0 commit comments