Skip to content

Commit

Permalink
fix: status bar not visible when caret is at the start of the document
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Mar 4, 2024
1 parent dd5ccec commit dca87f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/modes/textmode/StatusBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
$: pos = editorState?.selection?.main?.head
let line: Line | undefined
$: line = pos ? editorState?.doc?.lineAt(pos) : undefined
$: line = pos !== undefined ? editorState?.doc?.lineAt(pos) : undefined
let lineNumber: number | undefined
$: lineNumber = line ? line.number : undefined
$: lineNumber = line !== undefined ? line.number : undefined
let columnNumber: number | undefined
$: columnNumber = line !== undefined && pos !== undefined ? pos - line.from + 1 : undefined
Expand Down

0 comments on commit dca87f0

Please sign in to comment.