Skip to content

Commit

Permalink
fix: do not auto reveal end line when user visit history log
Browse files Browse the repository at this point in the history
Signed-off-by: Xuhui zhang <[email protected]>
  • Loading branch information
zxh326 committed Jul 12, 2024
1 parent 2abf179 commit c176921
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dashboard-ui-v2/src/components/log-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ const LogModal: React.FC<{
if (!editor) return
const model = editor.getModel()
if (!model) return
const visibleLine = editor.getVisibleRanges()[0]
if (visibleLine.endLineNumber + 5 < model.getLineCount()) {
return
}
editor.revealLine(model.getLineCount())
}, [data, editor])

Expand Down

0 comments on commit c176921

Please sign in to comment.