[#19] i_CTRL-X_CTRL-N deletes the line
Summary i_CTRL-X_CTRL-N deletes the line
Queue Vim on VMS
Type Bug
State Accepted
Priority 1. Low
Owners
Requester sferencik (at) alpha (dot) polarhome (dot) com
Created 12/08/2010 (2484 days ago)
Due
Updated 12/29/2010 (2463 days ago)
Assigned
Resolved
Attachments

History
12/29/2010 Zoltan Arpadffy State ⇒ Accepted
 
12/08/2010 sferencik@alpha.polarhome.com Comment #1
State ⇒ Unconfirmed
Queue ⇒ Vim on VMS
Summary ⇒ i_CTRL-X_CTRL-N deletes the line
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
In insert mode, Ctrl-X,N is used to autocomplete based on words in the current
buffer.

:he i_CTRL-X_CTRL-N

On VMS, in certain cases, pressing Ctrl-X deletes the current line (similar to
i_Ctrl-U).

To reproduce:
1) create a read-only file
     $ create a.txt
     [ctrl-z to end input]
     $ set file/prot=o:r a.txt
2) edit with vim - it is opened as [RO]
     $ vim a.txt
3) enter insert mode
     i
    vim shows a warning message (W10: Warning: Changing a readonly file), and
    then displays [+][RO]
4) type something; press Ctrl-X (the first part of Ctrl-X,N)
     hello<C-X>

Result:
Upon pressing Ctrl-X, vim deletes the whole line (the "hello" word).

Expected result (observable on Windows):
Upon pressing Ctrl-X, vim waits until N (to complete Ctrl-X,N), then offers
suggestions.

===================
Other notes:

I also got this behaviour in a writable file, but a read-only, edited 
file (with
[+][RO] had to be loaded in another buffer (or window?).

I only managed to get this behaviour shortly after editing the read-only file.
(Of course, this observation may be imprecise. It certainly seems strange.)