add keymap multi-chord sequences and a stateful matcher
T-205, the resolver foundation for Vim motions (dd, gg, dw, ciw) and repeat counts (5j). KeymapBinding now holds an ordered chord sequence (length 1 for the common single-chord case); `keys:` parses a space- separated spec into that sequence (D-82). Keymap.resolve keeps the single-chord fast path; a new stateless Keymap.match answers exact/prefix/none for a pending buffer. SequenceMatcher wraps that query with a pending buffer, a repeat-count prefix (leading digits, 0 excluded since it's the line-start motion), the d-vs-dd timeout case (flush fires the buffered exact), and broken- sequence recovery (discard, restart on the last chord). It is headless — no keyboard reads, no event swallowing — so the editor (T-206) can drive it from Focus.onKeyEvent and act on the result. Also drops a stray unused import in the Vim indicator test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
library;
|
||||
|
||||
import 'package:clide/builtin/vim/vim.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import '../../helpers/kernel_fixture.dart';
|
||||
|
||||
Reference in New Issue
Block a user