diff options
Diffstat (limited to 'source/blender/blenkernel/intern/text.c')
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 47b615c2573..4cd85fb342e 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -1286,6 +1286,19 @@ void txt_sel_all(Text *text) text->selc = text->sell->len; } +/** + * Reverse of #txt_pop_sel + * Clears the selection and ensures the cursor is located + * at the selection (where the cursor is visually while editing). + */ +void txt_sel_clear(Text *text) +{ + if (text->sell) { + text->curl = text->sell; + text->curc = text->selc; + } +} + void txt_sel_line(Text *text) { if (!text) return; |