feat: Enter opens a tree file fullscreen instead of expanding - #8
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Tree 뷰에서
Enter의 의미를 바꾼다.Focus::FileList) —Enter는 더 이상 디렉터리를 확장/접지 않는다. 확장은→/←전용이다. 파일 행에서Enter는 파일을 프리뷰 패널에 로드하고 그 패널을 fullscreen으로 키우며 포커스를 옮긴다. 디렉터리 행에서는 아무 일도 하지 않는다.Focus::DiffViewer) —Enter가 fullscreen을 토글한다 (<prefix> f와 동일). 들어간 키로 그대로 나올 수 있다.확장에 이미 방향키가 있으므로
Enter는 파일 열기에 쓰는 편이 낫다는 판단.How
focus.rs에set_diff_fullscreen(on)을 분리했다. "diff fullscreen 진입 시 terminal/list fullscreen 해제 + 포커스 이동" 규칙을 토글과 강제 진입이 한 곳에서 공유한다.tree_toggle→tree_open_selected(다른 호출자 없음).docs/architecture.md의 "트리 뷰는Enter도 확장한다" 문장을 갱신했다.검색 입력 중의
Enter는handle_diff_search_key/handle_tree_search_key가handle_unmapped_upper_key보다 먼저 가로채므로 기존 동작(검색 확정, 매치 reveal)이 그대로다.Tests
tree_open_on_directory_row_does_not_change_expansiontree_open_on_file_row_loads_file_view_and_goes_fullscreentree_open_on_file_row_clears_competing_fullscreensenter_in_diff_viewer_toggles_diff_fullscreencargo test1328 passed / 0 failed,cargo clippy --all-targets --all-features -- -D warningsclean.참고
이 PR은 fork의
dev브랜치를 통째로 올린 것이라, 위 변경 외에 아직 upstream에 없던 커밋 3개(9ee66f7,b2d0138,684d676— 테스트 환경 관련 수정과 설정 정리)도 함께 들어 있다.