Fixed tab editing when in readOnly mode (#1433)

pull/1428/head
carly-goodandbeautiful 2 years ago committed by Ahmed Hnewa
parent 3d5936c8ab
commit 8a20a68e8e
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 3
      lib/src/widgets/raw_editor.dart

@ -757,6 +757,9 @@ class RawEditorState extends EditorState
controller.document.queryChild(controller.selection.baseOffset);
KeyEventResult insertTabCharacter() {
if (widget.readOnly) {
return KeyEventResult.ignored;
}
controller.replaceText(controller.selection.baseOffset, 0, '\t', null);
_moveCursor(1);
return KeyEventResult.handled;

Loading…
Cancel
Save