Mercurial > vim
comparison src/os_unix.c @ 20437:3bb4dea4a164 v8.2.0773
patch 8.2.0773: switching to raw mode every time ":" is used
Commit: https://github.com/vim/vim/commit/3b1f18f785f67c6cd110498c366e4d0c0fe11f27
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 16 23:15:08 2020 +0200
patch 8.2.0773: switching to raw mode every time ":" is used
Problem: Switching to raw mode every time ":" is used.
Solution: When executing a shell set cur_tmode to TMODE_UNKNOWN, so that the
next time TMODE_RAW is used it is set, but not every time.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 May 2020 23:30:03 +0200 |
parents | 4c0c86098fcc |
children | d4b2a8675b78 |
comparison
equal
deleted
inserted
replaced
20436:d64dba8d8a9d | 20437:3bb4dea4a164 |
---|---|
4519 msg_outnum((long)x); | 4519 msg_outnum((long)x); |
4520 msg_putchar('\n'); | 4520 msg_putchar('\n'); |
4521 } | 4521 } |
4522 | 4522 |
4523 if (tmode == TMODE_RAW) | 4523 if (tmode == TMODE_RAW) |
4524 { | |
4525 // The shell may have messed with the mode, always set it. | |
4526 cur_tmode = TMODE_UNKNOWN; | |
4524 settmode(TMODE_RAW); // set to raw mode | 4527 settmode(TMODE_RAW); // set to raw mode |
4528 } | |
4525 # ifdef FEAT_TITLE | 4529 # ifdef FEAT_TITLE |
4526 resettitle(); | 4530 resettitle(); |
4527 # endif | 4531 # endif |
4528 # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) | 4532 # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) |
4529 restore_clipboard(); | 4533 restore_clipboard(); |
4569 int did_settmode = FALSE; // settmode(TMODE_RAW) called | 4573 int did_settmode = FALSE; // settmode(TMODE_RAW) called |
4570 | 4574 |
4571 out_flush(); | 4575 out_flush(); |
4572 if (options & SHELL_COOKED) | 4576 if (options & SHELL_COOKED) |
4573 settmode(TMODE_COOK); // set to normal mode | 4577 settmode(TMODE_COOK); // set to normal mode |
4578 if (tmode == TMODE_RAW) | |
4579 // The shell may have messed with the mode, always set it later. | |
4580 cur_tmode = TMODE_UNKNOWN; | |
4574 | 4581 |
4575 if (unix_build_argv(cmd, &argv, &tofree1, &tofree2) == FAIL) | 4582 if (unix_build_argv(cmd, &argv, &tofree1, &tofree2) == FAIL) |
4576 goto error; | 4583 goto error; |
4577 | 4584 |
4578 /* | 4585 /* |