|
35 | 35 | * TODO: |
36 | 36 | * - include functions from #1871 |
37 | 37 | * - do not store terminal buffer in viminfo. Or prefix term:// ? |
| 38 | + * - Make CTRL-W . send CTRL-W to terminal? |
38 | 39 | * - Add a scrollback buffer (contains lines to scroll off the top). |
39 | 40 | * Can use the buf_T lines, store attributes somewhere else? |
40 | 41 | * - When the job ends: |
@@ -204,7 +205,7 @@ ex_terminal(exarg_T *eap) |
204 | 205 | { |
205 | 206 | int i; |
206 | 207 | size_t len = STRLEN(cmd) + 10; |
207 | | - char_u *p = alloc(len); |
| 208 | + char_u *p = alloc((int)len); |
208 | 209 |
|
209 | 210 | for (i = 1; p != NULL; ++i) |
210 | 211 | { |
@@ -301,7 +302,7 @@ term_write_job_output(term_T *term, char_u *msg, size_t len) |
301 | 302 | { |
302 | 303 | if (*p == NL) |
303 | 304 | break; |
304 | | - p += utf_ptr2len_len(p, len - (p - msg)); |
| 305 | + p += utf_ptr2len_len(p, (int)(len - (p - msg))); |
305 | 306 | } |
306 | 307 | len_now = p - msg - done; |
307 | 308 | vterm_input_write(vterm, (char *)msg + done, len_now); |
@@ -453,7 +454,7 @@ term_convert_key(int c, char *buf) |
453 | 454 | vterm_keyboard_unichar(vterm, c, mod); |
454 | 455 |
|
455 | 456 | /* Read back the converted escape sequence. */ |
456 | | - return vterm_output_read(vterm, buf, KEY_BUF_LEN); |
| 457 | + return (int)vterm_output_read(vterm, buf, KEY_BUF_LEN); |
457 | 458 | } |
458 | 459 |
|
459 | 460 | /* |
@@ -540,7 +541,7 @@ terminal_loop(void) |
540 | 541 | if (len > 0) |
541 | 542 | /* TODO: if FAIL is returned, stop? */ |
542 | 543 | channel_send(curbuf->b_term->tl_job->jv_channel, PART_IN, |
543 | | - (char_u *)buf, len, NULL); |
| 544 | + (char_u *)buf, (int)len, NULL); |
544 | 545 | } |
545 | 546 | } |
546 | 547 |
|
@@ -1056,7 +1057,7 @@ term_get_status_text(term_T *term) |
1056 | 1057 | else |
1057 | 1058 | txt = (char_u *)_("finished"); |
1058 | 1059 | len = 9 + STRLEN(term->tl_buffer->b_fname) + STRLEN(txt); |
1059 | | - term->tl_status_text = alloc(len); |
| 1060 | + term->tl_status_text = alloc((int)len); |
1060 | 1061 | if (term->tl_status_text != NULL) |
1061 | 1062 | vim_snprintf((char *)term->tl_status_text, len, "%s [%s]", |
1062 | 1063 | term->tl_buffer->b_fname, txt); |
|
0 commit comments