Conversation
Codecov Report
@@ Coverage Diff @@
## master #10477 +/- ##
=======================================
Coverage 81.67% 81.68%
=======================================
Files 158 158
Lines 185154 185171 +17
Branches 41880 41884 +4
=======================================
+ Hits 151233 151250 +17
+ Misses 21469 21465 -4
- Partials 12452 12456 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Yegappan wrote:
Addresses the request made in #10098.
The help should mention that zero can be used for the current window.
It would be good (but more work) to check a wrapping line with
'breakindent' set. Could add this in test_breakindent.vim somewhere.
…--
Eight Megabytes And Continually Swapping.
/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Currently the screenpos2col() function takes the buffer line number and the |
|
Looking at the implementation, maybe this function name can be changed to |
|
Hi,
On Wed, May 25, 2022 at 8:15 PM zeertzjq ***@***.***> wrote:
Looking at the implementation, maybe this function name can be changed to
virtcol2col()?
Yes. As the function is accepting the buffer line number instead of the
screen
line number, it makes sense to name this virtcol2col().
Regards,
Yegappan
|
|
> It would be good (but more work) to check a wrapping line with
> 'breakindent' set. Could add this in test_breakindent.vim somewhere.
Currently the screenpos2col() function takes the buffer line number and the
screen column number and returns the buffer column number (byte offset).
Should we change this so that the function takes the screen line number
and screen column number and returns the buffer column number?
In this case, it will work only if the specified line is visible in a window.
The function name is confusing - it does not actually take a screen
position but a virtual column number. If I'm not mistaken that virtual
column number would come from virtcol(). For a virtual column the
display options don't apply.
Also consider screenpos(), which returns the screen row and column, not
the buffer line and virtual column.
Using virtcol2col() for the name sounds alright.
An actual screenpos2col(), doing the opposite of screenpos(), would also
be useful.
Keep in mind that I plan (at some time...) to make screenpos() work with
the 'conceal' feature, thus the function for the opposite should also be
able to do this. That is mostly for fixing the long standing bug that
the cursor positioning is wrong when characters are concealed and
clicking with the mouse.
…--
You had connectors? Eeee, when I were a lad we 'ad to carry the
bits between the computer and the terminal with a spoon...
/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
0410590 to
f0e5f15
Compare
…ual column Problem: There is no way to get the byte index from a virtual column. Solution: Add virtcol2col(). (Yegappan Lakshmanan, closes vim/vim#10477, closes vim/vim#10098) vim/vim@5a6ec10 Cherry-pick tv_check_for_number_arg() from Vim. Cherry-pick pathshorten() doc change.
Addresses the request made in #10098.