diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-29 14:16:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-29 14:16:42 +0100 |
commit | 2912abb3a2fd72074e3901c8ae1d4a77ce764675 (patch) | |
tree | 099327af555d07a9322b1f40df94f846e3bfcead /runtime | |
parent | e46736b23b7cc25b914415fe4ceb851504f5419c (diff) | |
download | vim-git-2912abb3a2fd72074e3901c8ae1d4a77ce764675.tar.gz |
patch 8.1.1071: cannot get composing characters from the screenv8.1.1071
Problem: Cannot get composing characters from the screen.
Solution: Add screenchars() and screenstring(). (partly by Ozaki Kiichi,
closes #4059)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 17 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 623da9efa..a01c4db38 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2525,8 +2525,10 @@ round({expr}) Float round off {expr} rubyeval({expr}) any evaluate |Ruby| expression screenattr({row}, {col}) Number attribute at screen position screenchar({row}, {col}) Number character at screen position +screenchars({row}, {col}) List List of characters at screen position screencol() Number current cursor column screenrow() Number current cursor row +screenstring({row}, {col}) String characters at screen position search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) Number search for {pattern} searchdecl({name} [, {global} [, {thisblock}]]) @@ -7510,6 +7512,13 @@ screenchar({row}, {col}) *screenchar()* This is mainly to be used for testing. Returns -1 when row or col is out of range. +screenchars({row}, {col}) *screenchars()* + The result is a List of Numbers. The first number is the same + as what |screenchar()| returns. Further numbers are + composing characters on top of the base character. + This is mainly to be used for testing. + Returns an empty List when row or col is out of range. + screencol() *screencol()* The result is a Number, which is the current screen column of the cursor. The leftmost column has number 1. @@ -7531,6 +7540,14 @@ screenrow() *screenrow()* Note: Same restrictions as with |screencol()|. +screenstring({row}, {col}) *screenstring()* + The result is a String that contains the base character and + any composing characters at position [row, col] on the screen. + This is like |screenchars()| but returning a String with the + characters. + This is mainly to be used for testing. + Returns an empty String when row or col is out of range. + search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* Search for regexp pattern {pattern}. The search starts at the cursor position (you can use |cursor()| to set it). diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 31beded6b..faa8b6b8f 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -723,6 +723,8 @@ Cursor and mark position: *cursor-functions* *mark-functions* diff_filler() get the number of filler lines above a line screenattr() get attribute at a screen line/row screenchar() get character code at a screen line/row + screenchars() get character codes at a screen line/row + screenstring() get string of characters at a screen line/row Working with text in the current buffer: *text-functions* getline() get a line or list of lines from the buffer |