Skip to content

Commit

Permalink
feat: improve ui hight to reduce the shaking issue
Browse files Browse the repository at this point in the history
Signed-off-by: seven <[email protected]>
  • Loading branch information
Blankll committed Nov 24, 2024
1 parent eb86e01 commit 015381e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/views/editor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,7 @@ const refreshActionMarks = (editor: Editor, searchTokens: SearchAction[]) => {
};
const codeLensProvider = monaco.languages.registerCodeLensProvider('search', {
provideCodeLenses: () => {
const model = queryEditor?.getModel();
if (!model) {
return;
}
provideCodeLenses: (model, _) => {
const lines = Array.from({ length: model.getLineCount() }, (_, i) => ({
lineNumber: i + 1,
lineContent: model.getLineContent(i + 1),
Expand Down Expand Up @@ -217,10 +212,11 @@ const copyCurlAction = (position: Range) => {
const setupQueryEditor = (code: string) => {
queryEditor = monaco.editor.create(queryEditorRef.value, {
automaticLayout: true,
theme: getEditorTheme(),
value: code,
language: 'search',
automaticLayout: true,
scrollBeyondLastLine: false,
minimap: { enabled: false },
});
if (!queryEditor) {
Expand Down

0 comments on commit 015381e

Please sign in to comment.