提交 ec611a10 编写于 作者: R Rob Lourens

Tweak search variable name (from #86619)

上级 b099d570
......@@ -35,7 +35,8 @@ import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility';
import { isMacintosh } from 'vs/base/common/platform';
export const OneLineHeight = 24;
/** Specified in searchview.css */
export const SingleLineInputHeight = 24;
export interface ISearchWidgetOptions {
value?: string;
......@@ -82,7 +83,7 @@ const ctrlKeyMod = (isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd);
function stopPropagationForMultiLineUpwards(event: IKeyboardEvent, value: string, textarea: HTMLTextAreaElement | null) {
const isMultiline = !!value.match(/\n/);
if (textarea && (isMultiline || textarea.clientHeight > OneLineHeight) && textarea.selectionStart > 0) {
if (textarea && (isMultiline || textarea.clientHeight > SingleLineInputHeight) && textarea.selectionStart > 0) {
event.stopPropagation();
return;
}
......@@ -90,7 +91,7 @@ function stopPropagationForMultiLineUpwards(event: IKeyboardEvent, value: string
function stopPropagationForMultiLineDownwards(event: IKeyboardEvent, value: string, textarea: HTMLTextAreaElement | null) {
const isMultiline = !!value.match(/\n/);
if (textarea && (isMultiline || textarea.clientHeight > OneLineHeight) && textarea.selectionEnd < textarea.value.length) {
if (textarea && (isMultiline || textarea.clientHeight > SingleLineInputHeight) && textarea.selectionEnd < textarea.value.length) {
event.stopPropagation();
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册