From cf8ae0781e41b9f4346c8f7ce3582964fc0821d1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 29 Mar 2026 21:09:59 +0530 Subject: [PATCH] ... --- docs/text-sizing-protocol.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/text-sizing-protocol.rst b/docs/text-sizing-protocol.rst index 867e7201f..95690e219 100644 --- a/docs/text-sizing-protocol.rst +++ b/docs/text-sizing-protocol.rst @@ -506,12 +506,12 @@ is such a function in the Python language: g = graphemes[i] if g is graphemes[-1]: prev_g = graphemes[i-1] - yield f'\x1b[{prev_g.width}D' # move cursor back] + yield f'\x1b[{prev_g.width}D' # move cursor back yield g.text - yield f'\x1b[{g.width}D' # move cursor back] - yield f'\x1b[{prev_g.width}@' # insert cells] + yield f'\x1b[{g.width}D' # move cursor back + yield f'\x1b[{prev_g.width}@' # insert cells yield prev_g.text - yield f'\x1b[{g.width}C' # move cursor forward] + yield f'\x1b[{g.width}C' # move cursor forward Then, using ``wcswidth()`` the application can split long text into lines of width no more than the screen width and use the above function to write each