diff --git a/FIX_PROPOSAL.md b/FIX_PROPOSAL.md new file mode 100644 index 0000000..1a4f05c --- /dev/null +++ b/FIX_PROPOSAL.md @@ -0,0 +1,23 @@ +To fix the issue, you need to apply the `count` value to widen the range in the `r + next-character` flow. Here's the exact code fix: + +```typescript +// In VimMode.tsx, replace the lines 1854-1863 with the following code: +if (info.key === 'r') { + const count = vim.getEffectiveCount(); + const range = new monaco.Range( + info.lineNumber, + info.column, + info.lineNumber, + Math.min(info.column + count, editor.getModel().getLineMaxColumn(info.lineNumber)) + ); + editor.executeEdits('vim-replace', [ + { + range, + text: nextChar, + }, + ]); + setLastChange({ range, count }); +} +``` + +This code applies the `count` value to widen the range, replacing the specified number of characters. The `Math.min` function ensures that the replacement does not exceed the end of the line. The `setLastChange` function is also updated to reflect the correct count. \ No newline at end of file