fix ctrl-w functionality

This commit is contained in:
sawka
2023-11-20 22:03:56 -08:00
parent 3f57ee8c46
commit ebdc1ff524
@@ -433,6 +433,9 @@ class TextAreaInput extends React.Component<{ onHeightChange: () => void }, {}>
break;
}
}
if (cutSpot == -1) {
cutSpot = 0;
}
let cutValue = value.slice(cutSpot, selStart);
let prevValue = value.slice(0, cutSpot);
let restValue = value.slice(selStart);