mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-21 21:01:43 +08:00
fix(ui): cannot redo and undo
This commit is contained in:
parent
ccf85fe2f5
commit
4fe8e4add4
@ -144,7 +144,7 @@ public class CodeEditor extends HVScrollView {
|
||||
}
|
||||
|
||||
public boolean canUndo() {
|
||||
return mTextViewRedoUndo.canRedo();
|
||||
return mTextViewRedoUndo.canUndo();
|
||||
}
|
||||
|
||||
public boolean canRedo() {
|
||||
|
||||
@ -419,6 +419,9 @@ public class TextViewUndoRedo {
|
||||
}
|
||||
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (mIsUndoOrRedo || !mEnabled) {
|
||||
return;
|
||||
}
|
||||
if (mEditHistory.size() < mInitialHistoryStackSize) {
|
||||
mInitialHistoryStackSize = 0;
|
||||
}
|
||||
|
||||
@ -111,10 +111,10 @@ public class DebugToolbarFragment extends ToolbarFragment implements DebugCallba
|
||||
return;
|
||||
}
|
||||
CodeEditor editor = mEditorView.getEditor();
|
||||
editor.setRedoUndoEnabled(true);
|
||||
if (!TextUtils.equals(mInitialEditorSourceUrl, mCurrentEditorSourceUrl)) {
|
||||
editor.setText(mInitialEditorSource);
|
||||
}
|
||||
editor.setRedoUndoEnabled(true);
|
||||
DebugBar debugBar = mEditorView.getDebugBar();
|
||||
debugBar.setTitle(null);
|
||||
debugBar.setCodeEvaluator(null);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user