Patch 8.1.1929
Problem:    No tests for text property popup window.
Solution:   Add a few tests.
Files:      src/testdir/Make_all.mak, src/textprop.c,
            src/testdir/test_popupwin_textprop.vim,
            src/testdir/dumps/Test_popup_textprop_01.dump,
            src/testdir/dumps/Test_popup_textprop_02.dump,
            src/testdir/dumps/Test_popup_textprop_03.dump,
            src/testdir/dumps/Test_popup_textprop_04.dump,
            src/testdir/dumps/Test_popup_textprop_05.dump,
            src/testdir/dumps/Test_popup_textprop_06.dump


*** ../vim-8.1.1928/src/testdir/Make_all.mak    2019-08-12 14:37:01.194209466 
+0200
--- src/testdir/Make_all.mak    2019-08-25 22:33:26.289179093 +0200
***************
*** 199,204 ****
--- 199,205 ----
        test_plus_arg_edit \
        test_popup \
        test_popupwin \
+       test_popupwin_textprop \
        test_preview \
        test_profile \
        test_prompt_buffer \
***************
*** 388,393 ****
--- 389,395 ----
        test_perl.res \
        test_plus_arg_edit.res \
        test_popupwin.res \
+       test_popupwin_textprop.res \
        test_preview.res \
        test_profile.res \
        test_prompt_buffer.res \
*** ../vim-8.1.1928/src/textprop.c      2019-08-25 22:24:58.871357010 +0200
--- src/textprop.c      2019-08-25 22:58:47.078631016 +0200
***************
*** 396,403 ****
      int                       i;
  
      // w_botline may not have been updated yet.
!     if (wp->w_botline > wp->w_buffer->b_ml.ml_line_count)
!       wp->w_botline = wp->w_buffer->b_ml.ml_line_count + 1;
      for (lnum = wp->w_topline; lnum < wp->w_botline; ++lnum)
      {
        count = get_text_props(wp->w_buffer, lnum, &props, FALSE);
--- 396,402 ----
      int                       i;
  
      // w_botline may not have been updated yet.
!     validate_botline();
      for (lnum = wp->w_topline; lnum < wp->w_botline; ++lnum)
      {
        count = get_text_props(wp->w_buffer, lnum, &props, FALSE);
*** ../vim-8.1.1928/src/testdir/test_popupwin_textprop.vim      2019-08-25 
23:07:25.487435944 +0200
--- src/testdir/test_popupwin_textprop.vim      2019-08-25 23:05:15.092179089 
+0200
***************
*** 0 ****
--- 1,54 ----
+ " Tests for popup windows for text properties
+ 
+ source check.vim
+ CheckFeature textprop
+ 
+ source screendump.vim
+ CheckScreendump
+ 
+ func Test_textprop_popup()
+   let lines =<< trim END
+       call setline(1, range(1, 100))
+       call setline(50, 'some text to work with')
+       50
+       normal zz
+       set scrolloff=0
+       call prop_type_add('popupMarker', #{highlight: 'DiffAdd'})
+       call prop_add(50, 11, #{
+               \ length: 7,
+               \ type: 'popupMarker',
+               \ })
+       let winid = popup_create('the text', #{
+             \ pos: 'botleft', 
+             \ textprop: 'popupMarker',
+             \ border: [],
+             \ padding: [0,1,0,1],
+             \ close: 'click',
+             \ })
+   END
+   call writefile(lines, 'XtestTextpropPopup')
+   let buf = RunVimInTerminal('-S XtestTextpropPopup', #{rows: 10})
+   call VerifyScreenDump(buf, 'Test_popup_textprop_01', {})
+ 
+   call term_sendkeys(buf, "zt")
+   call VerifyScreenDump(buf, 'Test_popup_textprop_02', {})
+ 
+   call term_sendkeys(buf, "zzIawe\<Esc>")
+   call VerifyScreenDump(buf, 'Test_popup_textprop_03', {})
+ 
+   call term_sendkeys(buf, "0dw")
+   call VerifyScreenDump(buf, 'Test_popup_textprop_04', {})
+ 
+   call term_sendkeys(buf, "Oinserted\<Esc>")
+   call VerifyScreenDump(buf, 'Test_popup_textprop_05', {})
+ 
+   call term_sendkeys(buf, "k2dd")
+   call VerifyScreenDump(buf, 'Test_popup_textprop_06', {})
+ 
+   " clean up
+   call StopVimInTerminal(buf)
+   call delete('XtestTextpropPopup')
+ endfunc
+ 
+ 
+ " vim: shiftwidth=2 sts=2
*** ../vim-8.1.1928/src/testdir/dumps/Test_popup_textprop_01.dump       
2019-08-25 23:07:25.491435921 +0200
--- src/testdir/dumps/Test_popup_textprop_01.dump       2019-08-25 
22:57:36.778933880 +0200
***************
*** 0 ****
--- 1,10 ----
+ |4+0&#ffffff0|6| @72
+ |4|7| @14|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@45
+ |4|8| @14|║+0#0000001#ffd7ff255| |t|h|e| |t|e|x|t| |║| +0#0000000#ffffff0@45
+ |4|9| @14|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@45
+ >s|o|m|e| |t|e|x|t| |t+0&#5fd7ff255|o| |w|o|r|k| +0&#ffffff0|w|i|t|h| @52
+ |5|1| @72
+ |5|2| @72
+ |5|3| @72
+ |5|4| @72
+ @57|5|0|,|1| @9|4|9|%| 
*** ../vim-8.1.1928/src/testdir/dumps/Test_popup_textprop_02.dump       
2019-08-25 23:07:25.495435896 +0200
--- src/testdir/dumps/Test_popup_textprop_02.dump       2019-08-25 
23:01:16.413646924 +0200
***************
*** 0 ****
--- 1,10 ----
+ >s+0&#ffffff0|o|m|e| |t|e|x|t| |t+0&#5fd7ff255|o| |w|o|r|k| 
+0&#ffffff0|w|i|t|h| @52
+ |5|1| @14|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@45
+ |5|2| @14|║+0#0000001#ffd7ff255| |t|h|e| |t|e|x|t| |║| +0#0000000#ffffff0@45
+ |5|3| @14|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@45
+ |5|4| @72
+ |5@1| @72
+ |5|6| @72
+ |5|7| @72
+ |5|8| @72
+ @57|5|0|,|1| @9|5|3|%| 
*** ../vim-8.1.1928/src/testdir/dumps/Test_popup_textprop_03.dump       
2019-08-25 23:07:25.499435876 +0200
--- src/testdir/dumps/Test_popup_textprop_03.dump       2019-08-25 
23:03:10.036927769 +0200
***************
*** 0 ****
--- 1,10 ----
+ |4+0&#ffffff0|6| @72
+ |4|7| @17|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@42
+ |4|8| @17|║+0#0000001#ffd7ff255| |t|h|e| |t|e|x|t| |║| +0#0000000#ffffff0@42
+ |4|9| @17|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@42
+ |a|w>e|s|o|m|e| |t|e|x|t| |t+0&#5fd7ff255|o| |w|o|r|k| +0&#ffffff0|w|i|t|h| 
@49
+ |5|1| @72
+ |5|2| @72
+ |5|3| @72
+ |5|4| @72
+ @57|5|0|,|3| @9|4|9|%| 
*** ../vim-8.1.1928/src/testdir/dumps/Test_popup_textprop_04.dump       
2019-08-25 23:07:25.503435853 +0200
--- src/testdir/dumps/Test_popup_textprop_04.dump       2019-08-25 
23:03:11.088921299 +0200
***************
*** 0 ****
--- 1,10 ----
+ |4+0&#ffffff0|6| @72
+ |4|7| @9|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@50
+ |4|8| @9|║+0#0000001#ffd7ff255| |t|h|e| |t|e|x|t| |║| +0#0000000#ffffff0@50
+ |4|9| @9|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@50
+ >t|e|x|t| |t+0&#5fd7ff255|o| |w|o|r|k| +0&#ffffff0|w|i|t|h| @57
+ |5|1| @72
+ |5|2| @72
+ |5|3| @72
+ |5|4| @72
+ @57|5|0|,|1| @9|4|9|%| 
*** ../vim-8.1.1928/src/testdir/dumps/Test_popup_textprop_05.dump       
2019-08-25 23:07:25.507435829 +0200
--- src/testdir/dumps/Test_popup_textprop_05.dump       2019-08-25 
23:05:25.912116090 +0200
***************
*** 0 ****
--- 1,10 ----
+ |4+0&#ffffff0|6| @72
+ |4|7| @72
+ |4|8| @9|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@50
+ |4|9| @9|║+0#0000001#ffd7ff255| |t|h|e| |t|e|x|t| |║| +0#0000000#ffffff0@50
+ |i|n|s|e|r|t|e>d| @3|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@50
+ |t|e|x|t| |t+0&#5fd7ff255|o| |w|o|r|k| +0&#ffffff0|w|i|t|h| @57
+ |5|1| @72
+ |5|2| @72
+ |5|3| @72
+ @57|5|0|,|8| @9|4|8|%| 
*** ../vim-8.1.1928/src/testdir/dumps/Test_popup_textprop_06.dump       
2019-08-25 23:07:25.511435809 +0200
--- src/testdir/dumps/Test_popup_textprop_06.dump       2019-08-25 
23:05:26.960110002 +0200
***************
*** 0 ****
--- 1,10 ----
+ |4+0&#ffffff0|6| @9|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@50
+ |4|7| @9|║+0#0000001#ffd7ff255| |t|h|e| |t|e|x|t| |║| +0#0000000#ffffff0@50
+ |4|8| @9|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@50
+ >t|e|x|t| |t+0&#5fd7ff255|o| |w|o|r|k| +0&#ffffff0|w|i|t|h| @57
+ |5|1| @72
+ |5|2| @72
+ |5|3| @72
+ |5|4| @72
+ |5@1| @72
+ @57|4|9|,|1| @9|5|0|%| 
*** ../vim-8.1.1928/src/version.c       2019-08-25 22:24:58.871357010 +0200
--- src/version.c       2019-08-25 22:33:03.721276148 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     1929,
  /**/

-- 
Support your right to bare arms!  Wear short sleeves!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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/201908252108.x7PL8jgW024189%40masaka.moolenaar.net.

Raspunde prin e-mail lui