Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A or I in Visual Mode only apply to one line #471

Closed
ataulien opened this issue Jul 25, 2019 · 4 comments
Closed

A or I in Visual Mode only apply to one line #471

ataulien opened this issue Jul 25, 2019 · 4 comments
Labels
A-vim Area: Vim/modal editing bug Something isn't working I-crash It crashes. Is very bad! I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor S-duplicate Status: Duplicate. This issue or pull request already exists U-libvim Upstream: Potentially dependent on changes in libvim

Comments

@ataulien
Copy link

I noticed that Oni2 crashes when you try to add some text to line starts or ends when in visual mode.

How to reproduce:

  1. Enter some text
  2. Press V to select it
  3. Press A or I
  4. (Oni2 hangs and crashes)

I expected to be able to enter text to get appended to the start (or end) of the selection.

The type of visual mode does not seem to matter. It crashes when selecting only a part of a line using v, it crashes when selecting whole lines via V and also in block selection mode via C-v.

I have used the windows artifacts built by Azure for commit b4774d6.

@bryphe bryphe added bug Something isn't working I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor labels Jul 25, 2019
@bryphe
Copy link
Member

bryphe commented Jul 25, 2019

Thanks for reporting, @ataulien !

I checked this out and we're hitting a blocking-input mode (it's hitting a codepath op_insert in libvim that hasn't been updated to be non-blocking) - working on it here: onivim/libvim#149

@bryphe bryphe added the S-duplicate Status: Duplicate. This issue or pull request already exists label Aug 2, 2019
@bryphe bryphe mentioned this issue Aug 2, 2019
@glennsl glennsl added I-crash It crashes. Is very bad! A-vim Area: Vim/modal editing U-libvim Upstream: Potentially dependent on changes in libvim labels Nov 18, 2019
@pkariz
Copy link

pkariz commented Dec 9, 2019

It doesn't seem to stuck now, but there is another problem with visual mode insert, example:

  1. ctrl + v
  2. select a few rows
  3. press I
  4. type whatever
  5. hit escape to go to the normal mode

the result is that the change is applied only to the last line instead of to all selected lines (+ at the start of the last line, not where you actually pressed ctrl + v).
Also if it helps, the visual selection is acting weird when you are selecting rows, for example in this file:

eval expr = case expr of
    AND (F::_) -> F

where the second line is indented with a tab, if you press ctrl+v on A in the second line and then press k to move up then the highlight will be incorrect

@n111k
Copy link

n111k commented Mar 29, 2020

Visual block append seems to suffer the same behavior @pkariz identified for insert operations.

Example (Onivim2 eb24c72 on Windows 10):
onivim2_vis_blk_append

Reference Behavior (Onivim 0.3.9 on Windows 10):
onivim_vis_blk_append

@CrossR CrossR changed the title Crash when pressing A or I in Visual Mode A or I in Visual Mode only apply to one line Sep 12, 2020
@bryphe
Copy link
Member

bryphe commented Jan 21, 2021

FYI, this should be fixed now with #3011

Feel free to open a new issue if there is still missing functionality here -

@bryphe bryphe closed this as completed Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-vim Area: Vim/modal editing bug Something isn't working I-crash It crashes. Is very bad! I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor S-duplicate Status: Duplicate. This issue or pull request already exists U-libvim Upstream: Potentially dependent on changes in libvim
Projects
None yet
Development

No branches or pull requests

5 participants