Add functions to set/get cursor and mark position using character count#7648
Closed
yegappan wants to merge 1 commit intovim:masterfrom
Closed
Add functions to set/get cursor and mark position using character count#7648yegappan wants to merge 1 commit intovim:masterfrom
yegappan wants to merge 1 commit intovim:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7648 +/- ##
==========================================
- Coverage 88.99% 88.88% -0.11%
==========================================
Files 148 148
Lines 164050 161968 -2082
==========================================
- Hits 145989 143969 -2020
+ Misses 18061 17999 -62
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…nter instead of byte count
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Hi,
On Sat, Jan 16, 2021 at 6:55 AM Shane-XB-Qian ***@***.***> wrote:
@brammool <https://github.com/brammool> @yegappan
<https://github.com/yegappan> there is a regression/not-compatible issue:
in the past cursor(line, col), that 'col' can be a 'string' type, now
must be 'int'.
for now, not sure caused by this, or vim9, since vim9 made type check
looks strict..
It is a regression caused by this change. I added a check to make sure
the column argument is a number. I didn't realize plugins are passing string
for this argument. I will create a PR to address this.
Regards,
Yegappan
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This was referenced Jan 16, 2021
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Jan 13, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Jan 13, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Jan 13, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Jan 14, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Jan 14, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Jan 29, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Jan 29, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Jan 29, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Feb 4, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Feb 4, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Feb 4, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Feb 4, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Feb 5, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Feb 5, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Feb 5, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
zbirenbaum
pushed a commit
to zbirenbaum/neovim
that referenced
this pull request
Feb 11, 2022
…ter count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
vim/vim@6f02b00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the following functions:
getcharpos() - Get the character position of the cursor or a mark. For non multibyte text, same as getpos().
setcharpos() - Set the character position of the cursor or a mark. For non multibyte text, same as setpos().
charcol() - Get the character count of the cursor or a mark in a line. For non multibyte text, same as col().
getcursorcharpos() - Get the character position of the cursor. For non multibyte text, same as getcurpos().
setcursorcharpos() - Set the character position of the cursor. For non multibyte text, same as cursor().