diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-09-30 20:06:09 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-10-03 20:06:52 +0200 |
commit | cfdc9eae27e0fc6197abe694c7488a169dd618e9 (patch) | |
tree | 9ea9d5d2282369162a5fe8baa1f0ea79d5d2f10d /subprojects/frontend/src/editor/EditorStore.ts | |
parent | feat: data structure for default assertions (diff) | |
download | refinery-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.ts | 4 |
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; |