runtime(netrw): Error popup not always used

Commit: 
https://github.com/vim/vim/commit/b4d11644254ec6e29aed93a9fdcde2160163aefd
Author: Damien <141588647+xrandomn...@users.noreply.github.com>
Date:   Thu Aug 15 22:00:45 2024 +0200

    runtime(netrw): Error popup not always used
    
    Problem:  g:netrw_use_errorwindow=2 does not work
              without +balloon_eval.
    Solution: Check for popup_atcursor().
    
    related: #15501
    
    Signed-off-by: Damien <141588647+xrandomn...@users.noreply.github.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 247ba0a35..07d26fae4 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -101,7 +101,7 @@ fun! netrw#ErrorMsg(level,msg,errnum)
   endif
 "  call Decho("level=".level,'~'.expand("<slnum>"))
 
-  if g:netrw_use_errorwindow == 2 && (v:version > 802 || (v:version == 802 && 
has("patch486")))
+  if g:netrw_use_errorwindow == 2 && exists("*popup_atcursor")
    " use popup window
    if type(a:msg) == 3
     let msg = [level]+a:msg
@@ -231,7 +231,10 @@ let g:netrw_localmovecmdopt    = ""
 
 " ---------------------------------------------------------------------
 " Default values for netrw's global protocol variables {{{2
-if (v:version > 802 || (v:version == 802 && has("patch486"))) && 
has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && 
has("syntax") && exists("g:syntax_on") && has("mouse")
+if exists("*popup_atcursor")
+\   && has("syntax")
+\   && exists("g:syntax_on")
+\   && has("mouse")
   call s:NetrwInit("g:netrw_use_errorwindow",2)
 else
   call s:NetrwInit("g:netrw_use_errorwindow",1)

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1segsC-003oOa-Pv%40256bit.org.

Raspunde prin e-mail lui