Shougo / unite.vim

:dragon: Unite and create user interfaces
http://www.vim.org/scripts/script.php?script_id=3396
Other
2.85k stars 227 forks source link

Cursor jumps when deleting a buffer from the buffer list #1206

Closed languitar closed 7 years ago

languitar commented 7 years ago

Problems summary

When using the buffers sources with let g:unite_split_rule = 'botright', deleting a buffer via a d press, the cursor jumps back to the initial position (bottom) instead of staying at the closest position. This makes deleting multiple buffers quite tedious because you have to move across the lines multiple times.

Expected

After deleting an entry, the cursor stays at the entry above or below.

Environment Information

Provide a minimal .vimrc with less than 50 lines (Required!)

set runtimepath+=/home/languitar/.local/share/nvim/bundle/unite.vim

let g:unite_split_rule = 'botright'

The reproduce ways from Vim starting (Required!)

  1. open a few buffers
  2. :Unite buffers
  3. move in the middle of the buffer list
  4. press d
Shougo commented 7 years ago

This is feature.

This makes deleting multiple buffers quite tedious because you have to move across the lines multiple times.

You should select multiple candidates and press d.

unite.vim development is done. So, I don't want to change it.

languitar commented 7 years ago

But there is an obvious difference in behavior. If I don't use that splitting rule, then the cursor doesn't jump.

Shougo commented 7 years ago

Because, it has different implementation. The reversed implementation is very complicated. I don't want to change.