Skip to content

Enable filename scrolling by default and fix background color #4685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 7, 2025

Conversation

zyv
Copy link
Member

@zyv zyv commented Apr 13, 2025

Proposed changes

The filename scrolling feature has a background coloring bug:

Full listing Long listing User listing
< before-full before-long before-user
> after-full after-long after-user

Refs: #2731

@zyv zyv requested a review from aborodin April 13, 2025 09:13
@zyv zyv self-assigned this Apr 13, 2025
@github-actions github-actions bot added needs triage Needs triage by maintainers prio: medium Has the potential to affect progress labels Apr 13, 2025
@github-actions github-actions bot added this to the Future Releases milestone Apr 13, 2025
@zyv zyv modified the milestones: Future Releases, 4.8.34 Apr 13, 2025
@zyv zyv added area: core Issues not related to a specific subsystem and removed needs triage Needs triage by maintainers labels Apr 13, 2025
@zyv zyv changed the title Ticket #XXXX: fix filename background color when scrolling Ticket #4685: fix filename background color when scrolling Apr 13, 2025
zyv added a commit that referenced this pull request Apr 13, 2025
@zyv zyv force-pushed the feature/fix-filename-scrolling-color branch from 23cab17 to 63443f4 Compare April 13, 2025 09:15
@mc-worker
Copy link

Added commit with small fix.

@mc-worker
Copy link

/approve

@mc-worker mc-worker added the state: approved If not using PRs: associated branch has been approved label Apr 13, 2025
@zyv
Copy link
Member Author

zyv commented Apr 13, 2025

Added commit with small fix.

So I actually thought about adding the exact same "fix" you did, but then I realized that this was probably done on purpose. Apparently, this feature was implemented to be completely hidden:

Initially, panel->content_shift == -1 and not 0. So you "enable" it by asking it to shift to the right once, even though it doesn't actually shift anything. That is why both indicators ({ & }) appear. You "disable" it by shifting left to -1, so both indicators disappear.

I think that in FAR Manager this behavior is always unconditionally enabled. What do you think about enabling this feature by setting panel->content_shift == 0 by default and leaving the traditional collapsing in the status bar?

I think right now the discoverability of this feature is zero. I didn't even know it existed. But I actually like it better than collapsing, and if collapsing stays in all other places, hopefully this would not make people unhappy.

@zyv
Copy link
Member Author

zyv commented Apr 13, 2025

/approve

Ha-ha, there is no end to this. Do you know why this failed now? Because @mc-worker is a private member of the organization, unlike @aborodin (or me). So GitHub cannot really check if you are authorized to post the comment o_O If you set it to public in @mc-worker profile, it should finally work :)

@mc-worker
Copy link

I think that in FAR Manager this behavior is always unconditionally enabled. What do you think about enabling this feature by setting panel->content_shift == 0 by default and leaving the traditional collapsing in the status bar?

Done. Please test.

@mc-worker mc-worker added state: in review If not using PRs: associated branch is being reviewed and removed state: approved If not using PRs: associated branch has been approved labels Apr 24, 2025
aborodin pushed a commit that referenced this pull request May 1, 2025
@aborodin aborodin force-pushed the feature/fix-filename-scrolling-color branch from c3c7ea0 to 6709b43 Compare May 1, 2025 05:53
@mc-worker
Copy link

@zyv please review

@aborodin aborodin force-pushed the feature/fix-filename-scrolling-color branch from 6709b43 to f90da2f Compare May 1, 2025 05:55
@mc-worker
Copy link

Hm... Scrolling of long filename is not documented at all. There is no any info in the man page.

@zyv
Copy link
Member Author

zyv commented May 4, 2025

/rebase

mc-butler pushed a commit that referenced this pull request May 4, 2025
@mc-butler mc-butler force-pushed the feature/fix-filename-scrolling-color branch from f90da2f to 3aace6a Compare May 4, 2025 15:45
@zyv zyv changed the title Ticket #4685: fix filename background color when scrolling Enable filename scrolling by default and fix background color May 4, 2025
@zyv zyv added state: approved If not using PRs: associated branch has been approved and removed state: in review If not using PRs: associated branch is being reviewed labels May 4, 2025
@zyv
Copy link
Member Author

zyv commented May 4, 2025

Hm... Scrolling of long filename is not documented at all. There is no any info in the man page.

I have added the shortcuts to the manual page.

Thanks for your help! Is it okay to merge now?

@aborodin
Copy link
Member

aborodin commented May 4, 2025 via email

@zyv
Copy link
Member Author

zyv commented May 5, 2025

I think it is not enough. The feature of filename scrolling is not described.
It would be great to add few words about this feature.

So what is there to describe? I checked FAR's help file and this is all they have on the subject:

Прокрутка длинных имён и описаний #Alt+Left,Alt+Right#
#Alt+Home,Alt+End#

Can you make a suggestion? I can translate it into English. I really have no idea what to write.

I think the real problem was that this feature was not only hidden, but the default shortcuts were not assigned (and of course not described).

@mc-worker
Copy link

I checked FAR's help file and this is all they have on the subject:

Indeed.

Ok. Approved.

@zyv
Copy link
Member Author

zyv commented May 7, 2025

/rebase

zyv and others added 9 commits May 7, 2025 10:07
  * (format_file): set FILENAME_SCROLL_LEFT flag if filename scroll
    offset is more than zero.
  * (repaint_file): display panel_filename_scroll_left_char if
    FILENAME_SCROLL_LEFT flag is set.

Signed-off-by: Andrew Borodin <[email protected]>
  * (WPanel): make content_shift and max_shift members unsigned.
  * (panel_sized_empty_new): init content_shift and max_shift members by
    zero.
  * (pamel_clean_dir): likewise.
  * (paint_dir): init max_shift by zero.
  * (format_file): simplify tests. Since content_shift and max_shift are
    unsigned, some conditions are always true.
  * (panel_content_scroll_left): likewise.
  * (panel_content_scroll_right): likewise.

Signed-off-by: Andrew Borodin <[email protected]>
@mc-butler mc-butler force-pushed the feature/fix-filename-scrolling-color branch from b7b8ae6 to 29be52e Compare May 7, 2025 10:07
@zyv zyv merged commit 9e62e51 into master May 7, 2025
17 checks passed
@zyv zyv deleted the feature/fix-filename-scrolling-color branch May 7, 2025 10:17
@github-actions github-actions bot removed the state: approved If not using PRs: associated branch has been approved label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Development

Successfully merging this pull request may close these issues.

3 participants