aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorStore.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-30 20:06:09 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-10-03 20:06:52 +0200
commitcfdc9eae27e0fc6197abe694c7488a169dd618e9 (patch)
tree9ea9d5d2282369162a5fe8baa1f0ea79d5d2f10d /subprojects/frontend/src/editor/EditorStore.ts
parentfeat: data structure for default assertions (diff)
downloadrefinery-cfdc9eae27e0fc6197abe694c7488a169dd618e9.tar.gz
refinery-cfdc9eae27e0fc6197abe694c7488a169dd618e9.tar.zst
refinery-cfdc9eae27e0fc6197abe694c7488a169dd618e9.zip
fix(frontend): editor selection visibility
Diffstat (limited to 'subprojects/frontend/src/editor/EditorStore.ts')
-rw-r--r--subprojects/frontend/src/editor/EditorStore.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts
index c74e732f..d13f644c 100644
--- a/subprojects/frontend/src/editor/EditorStore.ts
+++ b/subprojects/frontend/src/editor/EditorStore.ts
@@ -255,6 +255,10 @@ export default class EditorStore {
255 log.debug('Show line numbers', this.showLineNumbers); 255 log.debug('Show line numbers', this.showLineNumbers);
256 } 256 }
257 257
258 get hasSelection(): boolean {
259 return this.state.selection.ranges.some(({ from, to }) => from !== to);
260 }
261
258 formatText(): boolean { 262 formatText(): boolean {
259 this.client.formatText(); 263 this.client.formatText();
260 return true; 264 return true;