mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
shift up/down arrow do not invoke history
This commit is contained in:
+2
-7
@@ -13,7 +13,7 @@ import type * as T from "./types";
|
||||
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
||||
import {GlobalModel, GlobalCommandRunner, Session, Cmd, ScreenLines, Screen, riToRPtr, TabColors, RemoteColors} from "./model";
|
||||
import {windowWidthToCols, windowHeightToRows, termHeightFromRows, termWidthFromCols, getMonoFontSize} from "./textmeasure";
|
||||
import {isModKeyPress, boundInt, sortAndFilterRemotes, makeExternLink, isBlank} from "./util";
|
||||
import {isModKeyPress, boundInt, sortAndFilterRemotes, makeExternLink, isBlank, hasNoModifiers} from "./util";
|
||||
import {BookmarksView} from "./bookmarks";
|
||||
import {WebShareView} from "./webshare-client-view";
|
||||
import {HistoryView} from "./history";
|
||||
@@ -279,12 +279,7 @@ class TextAreaInput extends React.Component<{onHeightChange : () => void}, {}> {
|
||||
inputModel.openHistory();
|
||||
return;
|
||||
}
|
||||
if (e.code == "ArrowUp" && e.getModifierState("Shift")) {
|
||||
e.preventDefault();
|
||||
inputModel.openHistory();
|
||||
return;
|
||||
}
|
||||
if (e.code == "ArrowUp" || e.code == "ArrowDown") {
|
||||
if ((e.code == "ArrowUp" || e.code == "ArrowDown") && hasNoModifiers(e)) {
|
||||
if (!inputModel.isHistoryLoaded()) {
|
||||
if (e.code == "ArrowUp") {
|
||||
this.lastHistoryUpDown = true;
|
||||
|
||||
+5
-1
@@ -344,4 +344,8 @@ function isBoolEq(b1 : boolean, b2 : boolean) {
|
||||
return (!!b1) == (!!b2);
|
||||
}
|
||||
|
||||
export {handleJsonFetchResponse, base64ToArray, genMergeData, genMergeDataMap, genMergeSimpleData, parseEnv0, boundInt, isModKeyPress, incObs, isBlank, loadFonts, getTodayStr, getYesterdayStr, getDateStr, sortAndFilterRemotes, makeExternLink, isStrEq, isBoolEq};
|
||||
function hasNoModifiers(e : any) : boolean {
|
||||
return !e.getModifierState("Shift") && !e.getModifierState("Control") && !e.getModifierState("Meta") && !e.getModifierState("Alt");
|
||||
}
|
||||
|
||||
export {handleJsonFetchResponse, base64ToArray, genMergeData, genMergeDataMap, genMergeSimpleData, parseEnv0, boundInt, isModKeyPress, incObs, isBlank, loadFonts, getTodayStr, getYesterdayStr, getDateStr, sortAndFilterRemotes, makeExternLink, isStrEq, isBoolEq, hasNoModifiers};
|
||||
|
||||
Reference in New Issue
Block a user