Mercurial > vim
comparison src/channel.c @ 12313:44f3c9b7eec4 v8.0.1036
patch 8.0.1036: ++eof argument for terminal only available on MS-Windows
commit https://github.com/vim/vim/commit/dada6d2a8e887309e88cb126f1251d81f91b4b9d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 2 17:18:35 2017 +0200
patch 8.0.1036: ++eof argument for terminal only available on MS-Windows
Problem: ++eof argument for terminal only available on MS-Windows.
Solution: Also support ++eof on Unix. Add a test.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Sep 2017 17:30:03 +0200 |
parents | 66fa8eabbd6e |
children | d0cf7f71b95b |
comparison
equal
deleted
inserted
replaced
12312:754e3ee717e3 | 12313:44f3c9b7eec4 |
---|---|
1420 ch_log(channel, "written %d lines to channel", written); | 1420 ch_log(channel, "written %d lines to channel", written); |
1421 | 1421 |
1422 in_part->ch_buf_top = lnum; | 1422 in_part->ch_buf_top = lnum; |
1423 if (lnum > buf->b_ml.ml_line_count || lnum > in_part->ch_buf_bot) | 1423 if (lnum > buf->b_ml.ml_line_count || lnum > in_part->ch_buf_bot) |
1424 { | 1424 { |
1425 #if defined(WIN32) && defined(FEAT_TERMINAL) | 1425 #if defined(FEAT_TERMINAL) |
1426 /* Send CTRL-D or "eof_chars" to close stdin on Windows. A console | 1426 /* Send CTRL-D or "eof_chars" to close stdin on MS-Windows. */ |
1427 * application doesn't treat closing stdin like UNIX. */ | |
1428 if (channel->ch_job != NULL) | 1427 if (channel->ch_job != NULL) |
1429 term_send_eof(channel); | 1428 term_send_eof(channel); |
1430 #endif | 1429 #endif |
1431 | 1430 |
1432 /* Writing is done, no longer need the buffer. */ | 1431 /* Writing is done, no longer need the buffer. */ |
4638 return FAIL; | 4637 return FAIL; |
4639 } | 4638 } |
4640 } | 4639 } |
4641 else if (STRCMP(hi->hi_key, "eof_chars") == 0) | 4640 else if (STRCMP(hi->hi_key, "eof_chars") == 0) |
4642 { | 4641 { |
4643 # ifdef WIN3264 | |
4644 char_u *p; | 4642 char_u *p; |
4645 | 4643 |
4646 if (!(supported2 & JO2_EOF_CHARS)) | 4644 if (!(supported2 & JO2_EOF_CHARS)) |
4647 break; | 4645 break; |
4648 opt->jo_set2 |= JO2_EOF_CHARS; | 4646 opt->jo_set2 |= JO2_EOF_CHARS; |
4650 if (p == NULL) | 4648 if (p == NULL) |
4651 { | 4649 { |
4652 EMSG2(_(e_invarg2), "term_opencmd"); | 4650 EMSG2(_(e_invarg2), "term_opencmd"); |
4653 return FAIL; | 4651 return FAIL; |
4654 } | 4652 } |
4655 # endif | |
4656 } | 4653 } |
4657 else if (STRCMP(hi->hi_key, "term_rows") == 0) | 4654 else if (STRCMP(hi->hi_key, "term_rows") == 0) |
4658 { | 4655 { |
4659 if (!(supported2 & JO2_TERM_ROWS)) | 4656 if (!(supported2 & JO2_TERM_ROWS)) |
4660 break; | 4657 break; |