Patch 9.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.
Files:      src/termdefs.h, src/term.c


*** ../vim-9.0.1116/src/termdefs.h      2022-12-01 12:03:42.259227523 +0000
--- src/termdefs.h      2022-12-29 18:08:30.943696050 +0000
***************
*** 108,115 ****
      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
--- 108,113 ----
***************
*** 216,223 ****
  #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
--- 214,219 ----
*** ../vim-9.0.1116/src/term.c  2022-12-30 19:54:49.026722411 +0000
--- src/term.c  2022-12-30 19:55:34.034709581 +0000
***************
*** 1674,1679 ****
--- 1674,1680 ----
      "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,1742 ****
                        {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;
  
--- 1731,1741 ----
***************
*** 1775,1781 ****
      for (i = 0; key_names[i] != NULL; ++i)
        if (find_termcode((char_u *)key_names[i]) == NULL)
        {
!           p = TGETSTR(key_names[i], &tp);
            // if cursor-left == backspace, ignore it (televideo 925)
            if (p != NULL
                    && (*p != Ctrl_H
--- 1774,1781 ----
      for (i = 0; key_names[i] != NULL; ++i)
        if (find_termcode((char_u *)key_names[i]) == NULL)
        {
!           char_u *p = TGETSTR(key_names[i], &tp);
! 
            // if cursor-left == backspace, ignore it (televideo 925)
            if (p != NULL
                    && (*p != Ctrl_H
***************
*** 1803,1810 ****
  # ifndef hpux
      BC = (char *)TGETSTR("bc", &tp);
      UP = (char *)TGETSTR("up", &tp);
!     p = TGETSTR("pc", &tp);
!     if (p)
        PC = *p;
  # endif
  }
--- 1803,1810 ----
  # ifndef hpux
      BC = (char *)TGETSTR("bc", &tp);
      UP = (char *)TGETSTR("up", &tp);
!     char_u *p = TGETSTR("pc", &tp);
!     if (p != NULL)
        PC = *p;
  # endif
  }
*** ../vim-9.0.1116/src/version.c       2022-12-30 19:54:49.026722411 +0000
--- src/version.c       2022-12-30 21:06:49.105183070 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1117,
  /**/

-- 
Kisses may last for as much as, but no more than, five minutes.
                [real standing law in Iowa, United States of America]

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221230211051.7CB551C0AA4%40moolenaar.net.

Raspunde prin e-mail lui