patch 8.1.1071: cannot get composing characters from the screen
Problem: Cannot get composing characters from the screen.
Solution: Add screenchars() and screenstring(). (partly by Ozaki Kiichi,
closes #4059)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 623da9e..a01c4db 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2525,8 +2525,10 @@
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 @@
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 @@
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 31beded6..faa8b6b 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -723,6 +723,8 @@
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