Patch 8.2.2067 (after 8.2.2064)
Problem:    Cursor position in popup terminal is wrong.
Solution:   Don't check the flags.
Files:      src/terminal.c, src/testdir/test_popupwin.vim


*** ../vim-8.2.2066/src/terminal.c      2020-11-28 20:22:03.092081260 +0100
--- src/terminal.c      2020-11-28 21:53:56.539960388 +0100
***************
*** 2207,2216 ****
  #ifdef FEAT_PROP_POPUP
      if (popup_is_popup(wp))
      {
!       if ((wp->w_flags & WFLAG_WROW_OFF_ADDED) == 0)
!           wp->w_wrow += popup_top_extra(wp);
!       if ((wp->w_flags & WFLAG_WCOL_OFF_ADDED) == 0)
!           wp->w_wcol += popup_left_extra(wp);
        wp->w_flags |= WFLAG_WCOL_OFF_ADDED | WFLAG_WROW_OFF_ADDED;
      }
      else
--- 2207,2214 ----
  #ifdef FEAT_PROP_POPUP
      if (popup_is_popup(wp))
      {
!       wp->w_wrow += popup_top_extra(wp);
!       wp->w_wcol += popup_left_extra(wp);
        wp->w_flags |= WFLAG_WCOL_OFF_ADDED | WFLAG_WROW_OFF_ADDED;
      }
      else
*** ../vim-8.2.2066/src/testdir/test_popupwin.vim       2020-11-21 
21:41:36.186011139 +0100
--- src/testdir/test_popupwin.vim       2020-11-28 21:51:37.328459757 +0100
***************
*** 2662,2671 ****
    help
  
    let termbuf = term_start(&shell, #{hidden: 1})
!   let winid = popup_create(termbuf, #{minwidth: 40, minheight: 10})
!   " Wait for shell to start
    call WaitForAssert({-> assert_equal("run", 
job_status(term_getjob(termbuf)))})
!   sleep 100m
    " Check this doesn't crash
    call assert_equal(winnr(), winnr('j'))
    call assert_equal(winnr(), winnr('k'))
--- 2662,2679 ----
    help
  
    let termbuf = term_start(&shell, #{hidden: 1})
!   let winid = popup_create(termbuf, #{minwidth: 40, minheight: 10, border: 
[]})
!   " Wait for shell to start and show a prompt
    call WaitForAssert({-> assert_equal("run", 
job_status(term_getjob(termbuf)))})
!   sleep 20m
! 
!   " When typing a character, the cursor is after it.
!   call feedkeys("x", 'xt')
!   sleep 10m
!   redraw
!   call WaitForAssert({ -> assert_equal('x', screenstring(screenrow(), 
screencol() - 1))})
!   call feedkeys("\<BS>", 'xt')
! 
    " Check this doesn't crash
    call assert_equal(winnr(), winnr('j'))
    call assert_equal(winnr(), winnr('k'))
*** ../vim-8.2.2066/src/version.c       2020-11-28 21:21:13.830682201 +0100
--- src/version.c       2020-11-28 21:33:40.204170121 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2067,
  /**/

-- 
ARTHUR:  Then who is your lord?
WOMAN:   We don't have a lord.
ARTHUR:  What?
DENNIS:  I told you.  We're an anarcho-syndicalist commune.  We take it in
         turns to act as a sort of executive officer for the week.
                                  The Quest for the Holy Grail (Monty Python)

 /// 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/202011282056.0ASKup1Z3093051%40masaka.moolenaar.net.

Raspunde prin e-mail lui