(prefix: string)
| 1180 | } |
| 1181 | |
| 1182 | function computeExMatches(prefix: string): ExCompletionMatch[] { |
| 1183 | const argMatches = |
| 1184 | completeCommandArgs(prefix, 'view', ['edit', 'split', 'preview']) ?? |
| 1185 | completeCommandArgs(prefix, 'zen', ['toggle', 'on', 'off']) |
| 1186 | if (argMatches) return argMatches |
| 1187 | if (!prefix) { |
| 1188 | return registeredExNames.map((name) => ({ label: name, apply: name })) |
| 1189 | } |
| 1190 | return registeredExNames |
| 1191 | .filter((n) => n.startsWith(prefix)) |
| 1192 | .map((name) => ({ label: name, apply: name })) |
| 1193 | } |
| 1194 | |
| 1195 | /** |
| 1196 | * Global capture-phase Tab interceptor for the CodeMirror-Vim ex prompt. |
no test coverage detected