CTRL-P broken in version 8.1.2267

瀏覽次數:43 次
跳到第一則未讀訊息

WU RUXU

未讀,
2019年11月7日 凌晨1:39:312019/11/7
收件者:vim_use
Hi guys

    How to resolve this issue ?

Tony Mechelynck

未讀,
2019年11月7日 凌晨1:48:232019/11/7
收件者:vim_use
On Thu, Nov 7, 2019 at 7:39 AM WU RUXU <wrx...@gmail.com> wrote:
>
> Hi guys
>
> How to resolve this issue ?

Details, please:

Happens every time or only from time to time?
Console or GUI? If console, which terminal, and does it work in gvim?
Which OS?
Steps to reproduce?

For this last one, if you answer: "1. Hit Ctrl-P, Result: Nothing
happens", I'll reply: Works for me on gvim 8.1.2267 (Big) with GTK2
GUI on openSUSE Linux 15.1.

Best regards,
Tony.

WU RUXU

未讀,
2019年11月7日 凌晨1:58:132019/11/7
收件者:vim_use
sorry, I should provide more details here

1. Debian Linux
2. Console mode
3. xterm-250
4. vim in INSERT mode,  after user press CTRL-P , should be active keyword completion.

When I vim 8.0, this feature is work very well, but vim 8.1.2267, I found that this feature is broken

In INSERT mode, after I press CTRL-P , vim cann't active keyword completion

WU RUXU

未讀,
2019年11月7日 凌晨2:03:282019/11/7
收件者:vim_use
After I switch another terminal, This function is back

I think that problem should be come from xterm v350

Tony Mechelynck

未讀,
2019年11月7日 凌晨2:20:222019/11/7
收件者:vim_use
On Thu, Nov 7, 2019 at 8:03 AM WU RUXU <wrx...@gmail.com> wrote:
>
> After I switch another terminal, This function is back
>
> I think that problem should be come from xterm v350

Well, I tried it in all three of gvim, Vim in konsole 18.2.3 and Vim
in xterm 330, and I got a text-mode rolldown widget with suggestions
in all three cases. 'complete' was set at its default of ".,w,b,u,t,i"
and I tried to complete "buff" with the help open in the other window.

Best regards,
Tony.

WU RUXU

未讀,
2019年11月7日 凌晨2:41:522019/11/7
收件者:vim_use
Broken in  xterm v350, which release several days ago.

Marius Gedminas

未讀,
2019年11月7日 凌晨4:29:372019/11/7
收件者:vim...@googlegroups.com
On Wed, Nov 06, 2019 at 10:58:13PM -0800, WU RUXU wrote:
> 1. Debian Linux
> 2. Console mode
> 3. xterm-250
> 4. vim in INSERT mode,  after user press CTRL-P , should be active keyword
> completion.
>
> When I vim 8.0, this feature is work very well, but vim 8.1.2267, I found that
> this feature is broken
>
> In INSERT mode, after I press CTRL-P , vim cann't active keyword completion

Does this affect only Ctrl-P or every Ctrl-letter key? You can test by
pressing Ctrl-V Ctrl-A and you should see ^A inserted.

This might be related to xterm's modifyOtherKeys support added in recent
Vim versions.

(I'm not entirely sure how modifyOtherKeys work as I don't use xterm
myself. Does one have to enable it via ~/.Xresources or does vim detect
an xterm and enable it automatically via magic OSI sequences?)

Marius Gedminas
--
If you have to run heating in winter, you don't own enough computers.
signature.asc

Tony Mechelynck

未讀,
2019年11月7日 凌晨4:54:332019/11/7
收件者:vim_use
In my xterm (v330) modifyOtherKeys is on — i.e Insert-mode Ctrl-V
Ctrl-V gives ^[[27;5;118~ — and Insert-mode Ctrl-P gives me completion
suggestions in a rolldown widget. (I made sure that there was
something to complete, i.e. I started from the help, and in a new
window I inserted buff followed by Ctrl-P where "buffer" and "buffers"
were present in the help.) Of course if Vim doesn't find a fitting
completion it won't be able to complete anything.

Best regards,
Tony.

WU RUXU

未讀,
2019年11月7日 清晨5:33:022019/11/7
收件者:vim_use
other Ctrl-Key cann't works as expected

Ctrl-a  ->  'a'
Ctrl-b  ->  'b' 

my .Xdefaults: 
xyzok@debian:~$ cat .Xdefaults
#XTerm*font: -*-fixed-*-*-*-13-*
#XTerm*font: -*-terminus-*-*-*-16-*
XTerm*font:-*-unibit-*
XTerm*wideFont:-*-unibit-*
XTerm*foreground: black
XTerm*background: gray
XTerm*saveLines: 10240
XTerm*sessionMgt: false
XTerm*metaSendsEscape: false
XTerm*utf8Title: true
XTerm*preeditType: Root
#XTerm*rightScrollBar: true
#XTerm*scrollBar: true
#XTerm*pointerShape: circle
XTerm*pointerShape: dot
XTerm*pointerColor: red
Xft dpi:128
XTerm*charClass:47:48,46:48,45:48
XTerm*cjkWidth:false

my .vimrc:
xyzok@debian:~$ cat .vimrc
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal g'\"" | endif
set tabstop=4
set ruler
set showcmd
set undodir=~/.vim
set undofile
set undolevels=1000
set undoreload=3200
syntax on
set hlsearch
"set expandtab
"set encoding=utf-8
set fileencodings=default,gb18030,gb2312,utf-8
"set cindent shiftwidth=2
color default
map <A-1> 1gt
map <A-2> 2gt
map <A-3> 3gt
map <A-4> 4gt
map <A-5> 5gt
map <A-6> 6gt

Marius Gedminas

未讀,
2019年11月7日 清晨6:24:142019/11/7
收件者:vim...@googlegroups.com
FWIW I tested xterm v348 here with vim 8.1.2264, and I have no problems
with Ctrl-P triggering completion in insert mode

^V^P inserts ^[[27;5;112~ here.

I have no ~/.Xresources nor ~/.Xdefaults.

Marius Gedminas
--
C is for Cookies. Perl is even better for Cookies.
signature.asc

Marius Gedminas

未讀,
2019年11月7日 清晨6:35:392019/11/7
收件者:vim...@googlegroups.com
On Thu, Nov 07, 2019 at 01:24:06PM +0200, Marius Gedminas wrote:
> On Thu, Nov 07, 2019 at 10:54:15AM +0100, Tony Mechelynck wrote:
> > In my xterm (v330) modifyOtherKeys is on — i.e Insert-mode Ctrl-V
> > Ctrl-V gives ^[[27;5;118~ — and Insert-mode Ctrl-P gives me completion
> > suggestions in a rolldown widget. (I made sure that there was
> > something to complete, i.e. I started from the help, and in a new
> > window I inserted buff followed by Ctrl-P where "buffer" and "buffers"
> > were present in the help.) Of course if Vim doesn't find a fitting
> > completion it won't be able to complete anything.
>
> FWIW I tested xterm v348 here with vim 8.1.2264, and I have no problems
> with Ctrl-P triggering completion in insert mode

I've checked the changelogs for xterm 349 and 350, and they don't
mention anything relevant here (improved _documentation_ for
modifyOtherKeys is the only thing, but surely doc changes can't break
code).

I've also re-tested with vim 8.1.2267.

Marius Gedminas
--
Debugging a computer program is such an interesting activity because it's not
really a matter of fixing a program. It's a matter of fixing your own
understanding to the point that the cause of the bug becomes obvious. So
debugging means constantly challenging your assumptions, constantly looking
for the overlooked insignificant thing that turns out to be crucial.
-- Joey Hess
signature.asc

WU RUXU

未讀,
2019年11月7日 上午9:13:392019/11/7
收件者:vim_use
I have do following test on debian 10
1. Xterm v 350 and v330 , with vim 8.1.2267.
CTRL P can't work as expected
2. Xtrem v350 and v330, with vim 8.1.2111 ,
CTRL P can works as expected
3. vim 8.1.2111 and 8.1.2267 can works as expected in gnome terminal
4. vim 8.1.2111 and 8.1.2267 can works as expected in native framebuffer console

Bram Moolenaar

未讀,
2019年11月7日 上午10:18:442019/11/7
收件者:vim...@googlegroups.com、Marius Gedminas

Marius Gedminas wrote:

> On Wed, Nov 06, 2019 at 10:58:13PM -0800, WU RUXU wrote:
> > 1. Debian Linux
> > 2. Console mode
> > 3. xterm-250
> > 4. vim in INSERT mode,  after user press CTRL-P , should be active keyword
> > completion.
> >
> > When I vim 8.0, this feature is work very well, but vim 8.1.2267, I found that
> > this feature is broken
> >
> > In INSERT mode, after I press CTRL-P , vim cann't active keyword completion
>
> Does this affect only Ctrl-P or every Ctrl-letter key? You can test by
> pressing Ctrl-V Ctrl-A and you should see ^A inserted.
>
> This might be related to xterm's modifyOtherKeys support added in recent
> Vim versions.
>
> (I'm not entirely sure how modifyOtherKeys work as I don't use xterm
> myself. Does one have to enable it via ~/.Xresources or does vim detect
> an xterm and enable it automatically via magic OSI sequences?)

Vim uses t_TI and t_TE to enable and disable modifyOtherKeys.
They are set from the builtin xterm termcap.
Most xterm versions support it, very old ones should ignore the codes.
When the terminal is not actually an xterm (screen, tmux, etc.) it
should ignore the codes, but we can't be sure about that.

--
I wonder how much deeper the ocean would be without sponges.

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

Bram Moolenaar

未讀,
2019年11月7日 上午10:18:452019/11/7
收件者:vim...@googlegroups.com、WU RUXU
Check:
verbose set t_TI
verbose set esckeys?

You might work around it by settint t_TI and t_TE to empty (and running
a shell command, e.g.. :!ls).

--
You have the right to remain silent. Anything you say will be
misquoted, then used against you.

Bram Moolenaar

未讀,
2019年11月7日 下午4:57:392019/11/7
收件者:vim...@googlegroups.com、WU RUXU
I just installed xterm 350 and it works fine for me. With 'noesckeys'
and with 'esckeys'.

--
It was recently discovered that research causes cancer in rats.

WU RUXU

未讀,
2019年11月7日 下午6:38:082019/11/7
收件者:vim_use
What's your system?

WU RUXU

未讀,
2019年11月7日 晚上9:39:012019/11/7
收件者:vim_use
I have do more test on my system, found that
vim 8.1.2193 works, vim 8.1.2195 don't works. 
so I found that patch is much more relative with this issue.

WU RUXU

未讀,
2019年11月7日 晚上10:06:072019/11/7
收件者:vim_use
add following to .vimrc to fix this issue

let &t_TI = ""
let &t_TE = ""

Bram Moolenaar

未讀,
2019年11月8日 上午10:51:072019/11/8
收件者:vim...@googlegroups.com、WU RUXU

> add following to .vimrc to fix this issue
>
> let &t_TI = ""
> let &t_TE = ""

It should work without this. And it does for me. Thus I'm still wondering why
it fails for you.

--
Well, you come from nothing, you go back to nothing... What have you
lost? Nothing!
-- Monty Python: The life of Brian
回覆所有人
回覆作者
轉寄
0 則新訊息