CodeEditApp / CodeEditApp/CodeEdit

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

未关闭
#1,930 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Swift
星标
23k
派生
1.2k
PR 合并指标
30 天内没有已合并 PR

描述

### 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_

贡献指南

打开贡献指南

调研方向

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

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

评估

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

把新 issue 发到你的邮箱

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