@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.
@@ -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.getCursorLine();
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.getCursorLine() ?? 1;
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.getCursorLine();
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") };