Re: Avoid jumping cursor after undo

2022-03-16 Thread Lifepillar
On 2022-03-14, Lifepillar wrote: > I have defined this function: > > fun! Lint() > let l:view = winsaveview() > keepjumps normal gggqG > call winrestview(l:view) > endf > > When the function is executed, the cursor does not move, as expected. > Unfortunately, pressing u after that makes the

Re: Avoid jumping cursor after undo

2022-03-14 Thread Salman Halim
On Mon, Mar 14, 2022, 14:10 Lifepillar wrote: > I have defined this function: > > fun! Lint() > let l:view = winsaveview() > keepjumps normal gggqG > call winrestview(l:view) > endf > > When the function is executed, the cursor does not move, as expected. > Unfortunately, pressing u after

Avoid jumping cursor after undo

2022-03-14 Thread Lifepillar
I have defined this function: fun! Lint() let l:view = winsaveview() keepjumps normal gggqG call winrestview(l:view) endf When the function is executed, the cursor does not move, as expected. Unfortunately, pressing u after that makes the cursor jump to the top of the buffer. I had hoped