Patch submission #508closed
gm command created.
I created the gm command. This commands move the cursor column in the middle of the screen.
It works, but I don't know how to write the validate test, as there are no lua function to get the view width. Do I have to create one ?
This time I added a diff instead of a bundle, as Loïc asked me.
Updated by Loïc P. over 13 years ago
From line 508 to the end of your method :
Warning! motions commans are intended to return buffer position. here you are interested in the column, which is screen related (think about tab rendering).
You'll have to call YView::viewCursorFromLineColumn(line, column) to compute the corresponding buffer position.
You can give a column larger than the line width, but not larger than the screen.
It's ok to create necessary lua functions : put them in a separate patch.
Thank you for your work!
Updated by Arnaud Tanguy over 13 years ago
Indeed, I should think a little more before posing such rather stupid diffs (I focused on understanding viewCursorFromLineColumn role, and forget to see if my code was the best one)...
Thanks again, I think it is useless to post a diff file.