Mercurial > vim
comparison src/ui.c @ 12337:040a892d0eed v8.0.1048
patch 8.0.1048: no test for what 8.0.1020 fixes
commit https://github.com/vim/vim/commit/5e80de3f3e572805fe734b66bc42c13303ad9bdb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 3 15:48:12 2017 +0200
patch 8.0.1048: no test for what 8.0.1020 fixes
Problem: No test for what 8.0.1020 fixes.
Solution: Add test_feedinput(). Add a test. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2046)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 03 Sep 2017 16:00:05 +0200 |
parents | 60cf03e59402 |
children | 68d7bc045dbe |
comparison
equal
deleted
inserted
replaced
12336:3914c0edd581 | 12337:040a892d0eed |
---|---|
1649 } | 1649 } |
1650 vim_free(gap); | 1650 vim_free(gap); |
1651 } | 1651 } |
1652 } | 1652 } |
1653 | 1653 |
1654 #if defined(FEAT_GUI) \ | |
1655 || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE) \ | |
1656 || defined(FEAT_XCLIPBOARD) || defined(VMS) \ | |
1657 || defined(FEAT_CLIENTSERVER) \ | |
1658 || defined(PROTO) | |
1659 /* | 1654 /* |
1660 * Add the given bytes to the input buffer | 1655 * Add the given bytes to the input buffer |
1661 * Special keys start with CSI. A real CSI must have been translated to | 1656 * Special keys start with CSI. A real CSI must have been translated to |
1662 * CSI KS_EXTRA KE_CSI. K_SPECIAL doesn't require translation. | 1657 * CSI KS_EXTRA KE_CSI. K_SPECIAL doesn't require translation. |
1663 */ | 1658 */ |
1674 #endif | 1669 #endif |
1675 | 1670 |
1676 while (len--) | 1671 while (len--) |
1677 inbuf[inbufcount++] = *s++; | 1672 inbuf[inbufcount++] = *s++; |
1678 } | 1673 } |
1679 #endif | 1674 |
1680 | |
1681 #if ((defined(FEAT_XIM) || defined(FEAT_DND)) && defined(FEAT_GUI_GTK)) \ | |
1682 || defined(FEAT_GUI_MSWIN) \ | |
1683 || defined(FEAT_GUI_MAC) \ | |
1684 || (defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)) \ | |
1685 || (defined(FEAT_GUI) && (!defined(USE_ON_FLY_SCROLL) \ | |
1686 || defined(FEAT_MENU))) \ | |
1687 || defined(PROTO) | |
1688 /* | 1675 /* |
1689 * Add "str[len]" to the input buffer while escaping CSI bytes. | 1676 * Add "str[len]" to the input buffer while escaping CSI bytes. |
1690 */ | 1677 */ |
1691 void | 1678 void |
1692 add_to_input_buf_csi(char_u *str, int len) | 1679 add_to_input_buf_csi(char_u *str, int len) |
1704 buf[1] = (int)KE_CSI; | 1691 buf[1] = (int)KE_CSI; |
1705 add_to_input_buf(buf, 2); | 1692 add_to_input_buf(buf, 2); |
1706 } | 1693 } |
1707 } | 1694 } |
1708 } | 1695 } |
1709 #endif | |
1710 | 1696 |
1711 #if defined(FEAT_HANGULIN) || defined(PROTO) | 1697 #if defined(FEAT_HANGULIN) || defined(PROTO) |
1712 void | 1698 void |
1713 push_raw_key(char_u *s, int len) | 1699 push_raw_key(char_u *s, int len) |
1714 { | 1700 { |
1742 } | 1728 } |
1743 | 1729 |
1744 /* | 1730 /* |
1745 * Read as much data from the input buffer as possible up to maxlen, and store | 1731 * Read as much data from the input buffer as possible up to maxlen, and store |
1746 * it in buf. | 1732 * it in buf. |
1747 * Note: this function used to be Read() in unix.c | |
1748 */ | 1733 */ |
1749 int | 1734 int |
1750 read_from_input_buf(char_u *buf, long maxlen) | 1735 read_from_input_buf(char_u *buf, long maxlen) |
1751 { | 1736 { |
1752 if (inbufcount == 0) /* if the buffer is empty, fill it */ | 1737 if (inbufcount == 0) /* if the buffer is empty, fill it */ |