Repository navigation
fix: add layout.filename_position option (#910) - #911
Conversation
Preview window title (file path) was hardcoded to 'left'. New option aligns it independently of layout.title_position. Default unchanged. Closes #910
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The filename alignment option uses its own position across preview and file-info titles, with no actionable merge-blocking risk identified. Pre-merge checks |
|
@gustav-fff make a test for the filename that is different from the current default |
Moves cursor to docs/changelog.md so the preview title is re-set via update_preview_title, covering both prompt positions.
|
[triage-bot] DIRECTED: pushed 76648e6, new snapshot set
If you wanted something else, e.g. center on a non-README file, say so. Honk-Honk 🪿 |

Closes #910
Root cause
Preview window title (file path) alignment hardcoded
title_pos = 'left'inlua/fff/picker_ui/preview_manager.lua:131(path title),:221(Previewplaceholder) andlua/fff/layout.lua:429(initial preview window).layout.title_positionfrom #909 only covers the prompt/list title.Fix
layout.filename_position='left'(default) |'center'|'right', independent oftitle_position. Invalid value falls back to'left'.layout.resolve_title_pos(), shared by both options. Debugfile_infopanel title (where the path lives in debug mode) follows the same option so it does not jump.doc/fff.nvim.txtupdated. Defaults unchanged.Steps to reproduce
On pre-fix
main:Expected: file path on preview top border centered (
┬──── README.md ────┐).Actual (main): path glued to left corner (
┬ README.md ─────────┐), option silently ignored.How verified
filename_center/empty_{top,bottom}(tests/screenshots/tests-picker_ui_snap.lua---filename_center---*):┬────────────────────── README.md ───────────────────────┐,FFFilesstays left.title_center_no_count/*still shows centeredFFFileswith leftREADME.md, so the two options are independent.query_main_*/combo/debug_*failures, identical set on cleanmain(a7ded8b, diffedFAILlines). Pre-existing score drift, same as noted in fix: add layout.title_position and layout.show_file_count options (#908) #909. Allempty_*,no_results_*,cursor_second_item_*,scrollbarsnapshots pass unchanged.layout.computeheadless forleft|center|right|bogus|nilxtop|bottomprompt: previewtitle_posresolves to given value,bogus/nilfall back toleft.stylua --checkclean.Automated triage via Gustav. Honk-Honk 🪿
Summary by CodeRabbit
filename_positionsetting to align filenames in preview and file-information titles to the left, center, or right. It defaults to left alignment.