Skip to content

Add multiline status line support for file panels#1091

Draft
yegor-mialyk wants to merge 1 commit intoFarGroup:masterfrom
yegor-mialyk:multiline-status-line
Draft

Add multiline status line support for file panels#1091
yegor-mialyk wants to merge 1 commit intoFarGroup:masterfrom
yegor-mialyk:multiline-status-line

Conversation

@yegor-mialyk
Copy link
Copy Markdown
Contributor

Summary

Many people have asked for multiline status line support in file panels, allowing status information to be split across multiple lines instead of being limited to a single line.

Examples of multiline status configuration:

  • StatusColumnTypes="N,S" with StatusColumnWidths="0,10" -> a single status line with file name and size (same as today)
  • StatusColumnTypes="N,S|Z" with StatusColumnWidths="0,10|0" -> file name and size on the first status line, file description on the second
  • StatusColumnTypes="N,S||Z" with StatusColumnWidths="0,10||0" -> preserves an empty middle status line

If the team is interested, I can update help files, build etc

Checklist

  • I have followed the contributing guidelines.
  • I have discussed this with project maintainers:

    If not checked, I accept that this work might be rejected in favor of a different grand plan.

Details

  • Added dedicated multiline status line serialization and deserialization in panelmix.cpp / panelmix.hpp:

    • split status lines by |
    • preserved custom column names such as <name>
    • preserved empty status rows
    • reused the existing column parsing logic, extracted into a shared helper
    • relaxed parsing of column widths: it is fine to specify 0,10,0 instead of 0,10||0 for N,S||Z columns
  • Updated the panel mode configuration flow in config.cpp:

    • the panel mode editor now loads and saves status settings through serialize_status_line_settings() / deserialize_status_line_settings()
    • replaced StatusColumns with StatusLines
  • The biggest changes are in filelist.cpp:

    • introduced dynamic footer sizing based on the number of visible status lines and the panel size
    • updated height calculation and mouse handling to respect variable status footer height instead of assuming a fixed two-row footer, using helper methods:
      • visible_status_line_count()
      • status_footer_height()
      • status_separator_y()
      • status_text_top_y()
    • fixed a small issue with column title rendering when a negative column width is provided
    • PreparePanelView() now prepares widths for every status line
    • IsColumnDisplayed() now checks nested status lines as well as regular panel columns
    • refactored file list drawing in ShowList() (see below)
  • Refactored file list drawing from ShowList() (what a semi-recursive mess!) into render_file_list():

    • extracted status line rendering into render_status_lines()
    • because both the file list and the status line use common column rendering, that logic was extracted into render_column()
    • scrolling now works in the status line too, so if you put Z (file description) into the status line, you can scroll it
    • custom file name rendering with curly brackets in the file list remained intact (copy pasted almost "as is", may need additional cleanup)
    • unified and fixed extension column rendering (X[R]) and the column is scrollable now
    • 3/4 of the whole ShowList()/render_file_list() method is now custom name column rendering and background color magic for column dividers
  • No changes to the plugin API: you can pass | from a plugin (tested with TmpPanel) and it will be handled accordingly.

Comment thread far/common.tests.cpp Outdated
@yegor-mialyk yegor-mialyk force-pushed the multiline-status-line branch from 3f5ba0e to 0c459fa Compare April 7, 2026 23:32
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

@yegor-mialyk
Copy link
Copy Markdown
Contributor Author

Updated the help files to include the English version of the text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants