diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2021-02-13 18:55:37 -0500 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2021-02-13 18:55:37 -0500 |
commit | a81fbc0b621aef0eae640be3dc453eda409c70c2 (patch) | |
tree | ae9908e547e00b6c9064a105e83100d8515651f2 /src/textadept.c | |
parent | cd17224d42a019dc54e33b0ec787242165fcf90e (diff) |
Take advantage of Scinterm being able to use a native terminal caret.
Also change brace highlight style to not change the background color, as some
terminal cursors invert the current cell, so this would cause the highlighted
brace at the current position to "unhighlight", causing confusion.
This requires latest Scinterm.
Diffstat (limited to 'src/textadept.c')
-rw-r--r-- | src/textadept.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/textadept.c b/src/textadept.c index 43b58f09..f2e4129e 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -364,6 +364,8 @@ static void refresh_all() { refresh_pane(pane); if (command_entry_active) scintilla_noutrefresh(command_entry); refresh(); + if (findbox) return; + scintilla_update_cursor(!command_entry_active ? focused_view : command_entry); } /** @@ -455,7 +457,6 @@ static int focus_find(lua_State *L) { setCDKEntryPostProcess(find_entry, find_keypress, NULL); char *clipboard = scintilla_get_clipboard(focused_view, NULL); GPasteBuffer = copyChar(clipboard); // set the CDK paste buffer - curs_set(1); refreshCDKScreen(findbox), activateCDKEntry(focused_entry = find_entry, NULL); while (focused_entry->exitType == vNORMAL || focused_entry->exitType == vNEVER_ACTIVATED) { @@ -466,7 +467,6 @@ static int focus_find(lua_State *L) { find_entry->exitType = repl_entry->exitType = vNEVER_ACTIVATED; refreshCDKScreen(findbox), activateCDKEntry(focused_entry, NULL); } - curs_set(0); // Set Scintilla clipboard with new CDK paste buffer if necessary. if (strcmp(clipboard, GPasteBuffer) != 0) SS(focused_view, SCI_COPYTEXT, strlen(GPasteBuffer), (sptr_t)GPasteBuffer); @@ -2504,7 +2504,6 @@ int main(int argc, char **argv) { ta_tk = termkey_new(0, 0); setlocale(LC_CTYPE, ""); // for displaying UTF-8 characters properly initscr(); // raw()/cbreak() and noecho() are taken care of in libtermkey - curs_set(0); // disable cursor when Scintilla has focus #if NCURSES_REENTRANT ESCDELAY = getenv("ESCDELAY") ? atoi(getenv("ESCDELAY")) : 100; #endif |