diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-28 17:46:34 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-09-28 17:46:34 +0800 |
commit | 5a64dfc8bb8169e72b7c1164f18c6912e9e3576e (patch) | |
tree | 3de91e3bc8d8dc1401709ba5e9814bb4e03b3a62 | |
parent | de3cfc866bb6c79ab431325cc91510123bc69699 (diff) |
fix: hide menu anyway when cursor changes
-rw-r--r-- | src/editor.mjs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/editor.mjs b/src/editor.mjs index ea80a19..c04ba24 100644 --- a/src/editor.mjs +++ b/src/editor.mjs | |||
@@ -476,6 +476,7 @@ const addSuggestions = (anchor, suggestions) => { | |||
476 | // EVENT: Suggests for current selection {{{ | 476 | // EVENT: Suggests for current selection {{{ |
477 | // FIXME Dont show suggestion when selecting multiple chars | 477 | // FIXME Dont show suggestion when selecting multiple chars |
478 | cm.on("cursorActivity", (_) => { | 478 | cm.on("cursorActivity", (_) => { |
479 | menu.style.display = 'none' | ||
479 | const anchor = cm.getCursor() | 480 | const anchor = cm.getCursor() |
480 | 481 | ||
481 | if (insideCodeblockForMap(anchor)) { | 482 | if (insideCodeblockForMap(anchor)) { |