@fresh-editor/fresh-editor 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +0 -1
- package/package.json +1 -1
- package/plugins/dashboard.ts +3 -3
- package/plugins/examples/bookmarks.ts +3 -2
- package/plugins/lib/finder.ts +57 -10
- package/plugins/lib/fresh.d.ts +71 -31
- package/plugins/lib/widgets.ts +8 -0
- package/plugins/live_grep.i18n.json +349 -27
- package/plugins/live_grep.ts +596 -141
- package/plugins/orchestrator.ts +1227 -393
- package/plugins/vi_mode.ts +3 -3
package/plugins/vi_mode.ts
CHANGED
|
@@ -395,7 +395,7 @@ registerHandler("vi_line_end", vi_line_end);
|
|
|
395
395
|
async function vi_first_non_blank() : Promise<void> {
|
|
396
396
|
consumeCount(); // Count doesn't apply
|
|
397
397
|
// Get line start position directly (avoids stale snapshot from executeAction)
|
|
398
|
-
const line = editor.
|
|
398
|
+
const line = editor.getPrimaryCursor()?.line ?? 0;
|
|
399
399
|
const bufferId = editor.getActiveBufferId();
|
|
400
400
|
const lineStart = await editor.getLineStartPosition(line);
|
|
401
401
|
if (lineStart === null) {
|
|
@@ -939,7 +939,7 @@ async function vi_visual_block() : Promise<void> {
|
|
|
939
939
|
// Calculate line and column for block anchor
|
|
940
940
|
const cursorPos = editor.getCursorPosition();
|
|
941
941
|
if (cursorPos !== null) {
|
|
942
|
-
const line = editor.
|
|
942
|
+
const line = editor.getPrimaryCursor()?.line ?? 1;
|
|
943
943
|
const lineStart = await editor.getLineStartPosition(line);
|
|
944
944
|
const col = lineStart !== null ? cursorPos - lineStart : 0;
|
|
945
945
|
state.visualBlockAnchor = { line, col };
|
|
@@ -2702,7 +2702,7 @@ async function executeCommand(
|
|
|
2702
2702
|
if (info) {
|
|
2703
2703
|
const modified = info.modified ? editor.t("info.modified") : "";
|
|
2704
2704
|
const path = info.path || editor.t("info.no_name");
|
|
2705
|
-
const line = editor.
|
|
2705
|
+
const line = editor.getPrimaryCursor()?.line ?? 0;
|
|
2706
2706
|
return { message: editor.t("info.file", { path, modified, line: String(line), bytes: String(info.length) }) };
|
|
2707
2707
|
}
|
|
2708
2708
|
return { error: editor.t("error.no_buffer") };
|