Skip to content

Commit 47976c7

Browse files
committed
fix
1 parent 024cee1 commit 47976c7

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

src/cm/lsp/clientManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { getIndentUnit, indentUnit } from "@codemirror/language";
22
import {
3-
LSPClient,
4-
LSPPlugin,
53
findReferencesKeymap,
64
formatKeymap,
75
hoverTooltips,
86
jumpToDefinitionKeymap,
7+
LSPClient,
8+
LSPPlugin,
99
renameKeymap,
1010
serverCompletion,
1111
serverDiagnostics,

src/lib/editorManager.js

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ import {
1414

1515
import { indentUnit } from "@codemirror/language";
1616
import { search } from "@codemirror/search";
17-
import {
18-
Compartment,
19-
EditorState,
20-
Prec,
21-
StateEffect,
22-
} from "@codemirror/state";
17+
import { Compartment, EditorState, Prec, StateEffect } from "@codemirror/state";
2318
import { oneDark } from "@codemirror/theme-one-dark";
2419
import {
2520
EditorView,
@@ -147,11 +142,12 @@ async function EditorManager($header, $body) {
147142
const pointerCursorVisibilityExtension = EditorView.updateListener.of(
148143
(update) => {
149144
if (!update.selectionSet) return;
150-
const pointerTriggered = update.transactions.some((tr) =>
151-
tr.isUserEvent("pointer") ||
152-
tr.isUserEvent("select.pointer") ||
153-
tr.isUserEvent("touch") ||
154-
tr.isUserEvent("select.touch"),
145+
const pointerTriggered = update.transactions.some(
146+
(tr) =>
147+
tr.isUserEvent("pointer") ||
148+
tr.isUserEvent("select.pointer") ||
149+
tr.isUserEvent("touch") ||
150+
tr.isUserEvent("select.touch"),
155151
);
156152
if (!pointerTriggered) return;
157153
if (isCursorVisible()) return;
@@ -1582,11 +1578,9 @@ async function EditorManager($header, $body) {
15821578

15831579
const scrollerRect = scroller.getBoundingClientRect();
15841580
const relativeTop = caret.top - scrollerRect.top + scroller.scrollTop;
1585-
const relativeBottom =
1586-
caret.bottom - scrollerRect.top + scroller.scrollTop;
1581+
const relativeBottom = caret.bottom - scrollerRect.top + scroller.scrollTop;
15871582
const topMargin = 16;
1588-
const bottomMargin =
1589-
(appSettings.value?.teardropSize || 24) + 12;
1583+
const bottomMargin = (appSettings.value?.teardropSize || 24) + 12;
15901584

15911585
const scrollTop = scroller.scrollTop;
15921586
const visibleTop = scrollTop + topMargin;
@@ -1615,9 +1609,7 @@ async function EditorManager($header, $body) {
16151609
if (!caret) return true;
16161610

16171611
const scrollerRect = scroller.getBoundingClientRect();
1618-
return (
1619-
caret.top >= scrollerRect.top && caret.bottom <= scrollerRect.bottom
1620-
);
1612+
return caret.top >= scrollerRect.top && caret.bottom <= scrollerRect.bottom;
16211613
}
16221614

16231615
/**

0 commit comments

Comments
 (0)