Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

✨ Scroll and cursor position in file are lost when switching to another file and then back

未关闭
#1,930 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
swift
领域
desktop

调研方向

issue 中没有指定文件或测试。首先在 CodeEdit 中复现标签页切换流程,并跟踪打开文件的光标和滚动状态在哪里处理;完成标准是返回之前打开过的文件时,两个位置都能恢复。

由索引模型根据 Issue 内容生成。

描述

bug
Description

When you navigate inside a file, then you go to another file keeping the previous one open and when you get back to the first file, the scroll position and of the cursor location in the first file are lost, so it automatically shows up the top of that file.

To Reproduce
  1. Open the file a.cpp and navigate through it so you go to a specific cpp function inside that file.
  2. Open the file b.cpp in another tab while keeping the file a.cpp open in its tab.
  3. When you get back to the opened tab of the file a.cpp, you are redirected to the top of the file a.cpp.
    So when you are focusing much on a specific function in a.cpp and just wanted to check something related to that in b.cpp, when you get back to the open tab of a.cpp, you completely lost the position of the cursor on the function that you were working on.
Expected Behavior

The position of the cursor in the open file that you left open in a tab for a while should be the same when you get back to it.

Version Information

CodeEdit: [0.3.2]
macOS: [14.1.2 (23B92)]

Additional Context

No response

Screenshots

No response

主要语言
Swift
星标
23k
派生
1.2k
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CodeEditApp/CodeEdit 的其他 Issue

查看 CodeEditApp/CodeEdit 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。