summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-30 21:10:25 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-30 21:10:25 +0000
commit7b8db111e819bcb07cff6fc451584b0e3e0a49fd (patch)
tree9fc38c6405910951e99b47cce3f05bff4706d107
parent770713794a59f8f315f331025a15e3c25aa5ddfe (diff)
downloadvim-git-7b8db111e819bcb07cff6fc451584b0e3e0a49fd.tar.gz
patch 9.0.1117: terminfo entries for bracketed paste are not usedv9.0.1117
Problem: Terminfo entries for bracketed paste are not used. Solution: Use the newly added terminfo entries for bracketed paste. Correct mixup of output strings and key codes.
-rw-r--r--src/term.c10
-rw-r--r--src/termdefs.h4
-rw-r--r--src/version.c2
3 files changed, 7 insertions, 9 deletions
diff --git a/src/term.c b/src/term.c
index e83c198bd..e7466e684 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1674,6 +1674,7 @@ static char *(key_names[]) =
"k7", "k8", "k9", "k;", "F1", "F2",
"%1", "&8", "kb", "kI", "kD", "kh",
"@7", "kP", "kN", "K1", "K3", "K4", "K5", "kB",
+ "PS", "PE",
NULL
};
#endif
@@ -1730,13 +1731,11 @@ get_term_entries(int *height, int *width)
{KS_U7, "u7"}, {KS_RFG, "RF"}, {KS_RBG, "RB"},
{KS_8F, "8f"}, {KS_8B, "8b"}, {KS_8U, "8u"},
{KS_CBE, "BE"}, {KS_CBD, "BD"},
- {KS_CPS, "PS"}, {KS_CPE, "PE"},
{KS_CST, "ST"}, {KS_CRT, "RT"},
{KS_SSI, "Si"}, {KS_SRI, "Ri"},
{(enum SpecialKey)0, NULL}
};
int i;
- char_u *p;
static char_u tstrbuf[TBUFSZ];
char_u *tp = tstrbuf;
@@ -1775,7 +1774,8 @@ get_term_entries(int *height, int *width)
for (i = 0; key_names[i] != NULL; ++i)
if (find_termcode((char_u *)key_names[i]) == NULL)
{
- p = TGETSTR(key_names[i], &tp);
+ char_u *p = TGETSTR(key_names[i], &tp);
+
// if cursor-left == backspace, ignore it (televideo 925)
if (p != NULL
&& (*p != Ctrl_H
@@ -1803,8 +1803,8 @@ get_term_entries(int *height, int *width)
# ifndef hpux
BC = (char *)TGETSTR("bc", &tp);
UP = (char *)TGETSTR("up", &tp);
- p = TGETSTR("pc", &tp);
- if (p)
+ char_u *p = TGETSTR("pc", &tp);
+ if (p != NULL)
PC = *p;
# endif
}
diff --git a/src/termdefs.h b/src/termdefs.h
index 9e9601f1a..a258dadb7 100644
--- a/src/termdefs.h
+++ b/src/termdefs.h
@@ -108,8 +108,6 @@ enum SpecialKey
KS_8U, // set underline color (RGB)
KS_CBE, // enable bracketed paste mode
KS_CBD, // disable bracketed paste mode
- KS_CPS, // start of bracketed paste
- KS_CPE, // end of bracketed paste
KS_CST, // save window title
KS_CRT, // restore window title
KS_SSI, // save icon text
@@ -216,8 +214,6 @@ extern char_u *(term_strings[]); // current terminal strings
#define T_8U (TERM_STR(KS_8U)) // set underline color (RGB)
#define T_BE (TERM_STR(KS_CBE)) // enable bracketed paste mode
#define T_BD (TERM_STR(KS_CBD)) // disable bracketed paste mode
-#define T_PS (TERM_STR(KS_CPS)) // start of bracketed paste
-#define T_PE (TERM_STR(KS_CPE)) // end of bracketed paste
#define T_CST (TERM_STR(KS_CST)) // save window title
#define T_CRT (TERM_STR(KS_CRT)) // restore window title
#define T_SSI (TERM_STR(KS_SSI)) // save icon text
diff --git a/src/version.c b/src/version.c
index 429d76c4c..9c64a27b1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1117,
+/**/
1116,
/**/
1115,