Skip to content

Commit

Permalink
feat: support customizing max width (AppFlowy-IO#894)
Browse files Browse the repository at this point in the history
* Revert "fix: backquote key will cause crash when using French IME (AppFlowy-IO#892)"

This reverts commit b888202.

* feat: support customizing max width
  • Loading branch information
LucasXu0 committed Sep 20, 2024
1 parent 0a0154f commit cf340a2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,15 @@ Future<void> onInsert(

final textInserted = insertion.textInserted;

// In France, the backtick key is used to toggle a character style.
// We should prevent the execution of character shortcut events when the
// composing range is not collapsed.
if (insertion.composing.isCollapsed) {
// execute character shortcut events
final execution = await executeCharacterShortcutEvent(
editorState,
textInserted,
characterShortcutEvents,
);
// character shortcut events
final execution = await executeCharacterShortcutEvent(
editorState,
textInserted,
characterShortcutEvents,
);

if (execution) {
return;
}
if (execution) {
return;
}

var selection = editorState.selection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import 'package:flutter/services.dart';
Future<void> onNonTextUpdate(
TextEditingDeltaNonTextUpdate nonTextUpdate,
EditorState editorState,
List<CharacterShortcutEvent> characterShortcutEvents,
) async {
AppFlowyEditorLog.input.debug('onNonTextUpdate: $nonTextUpdate');

// update the selection on Windows
//
// when typing characters with CJK IME on Windows, a non-text update is sent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class KeyboardServiceWidgetState extends State<KeyboardServiceWidget>
onNonTextUpdate: (nonTextUpdate) async => await onNonTextUpdate(
nonTextUpdate,
editorState,
widget.characterShortcutEvents,
),
onPerformAction: (action) async => await onPerformAction(
action,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ void main() {
composing: TextRange(start: 0, end: 3),
),
EditorState.blank(),
[],
);
});
});
Expand Down

0 comments on commit cf340a2

Please sign in to comment.