Skip to content
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

Allow separate styles for cursor in normal and preview panes, simplify tagfmt and errorfmt #1086

Merged
merged 2 commits into from
Feb 11, 2023

Commits on Jan 21, 2023

  1. Allow separate styles for cursor in normal and preview panes

    This defines new `cursorfmt` and `crusorpreviewfmt` options to style cursor in normal/preview panes. This allows using a different style for the normal and preview cursor. The documentation includes several possible values these options can be set to.
    
    The default behavior is an underline, same as in
    gokcehan#1072, since it should not cause severe
    problems and be visible on all terminals. It can now be easily changed, as explained in the docs. I also added an example to `etc/lfrc.example`.
    
    See linked issues and PRs for the more context.
    
    Fixes gokcehan#1038
    
    Follows up on:
    
    gokcehan#1072
    gokcehan#924
    gokcehan@b47cf6d5a5
    ilyagr committed Jan 21, 2023
    Configuration menu
    Copy the full SHA
    775af75 View commit details
    Browse the repository at this point in the history
  2. Simplify configuration of several formatting options

    This simplifies the configuration of `cursorfmt`, `cursorpreviewfmt`, `tagfmt`,
    and `errorfmt` options.
    
    In almost all usecases, the value of these options had to end with `%s\033[0m`
    to print the contents of filename/tag/error and reset the terminal style. Now,
    if `%s` is not part of the option's value, `%s\033[0m` is appended
    automatically. This simplifies configuration.
    
    I retained the same behavior as before when `%s` is part of the string for
    backwards compatibility. I think it should be considered deprecated, but it
    also causes no harm.
    ilyagr committed Jan 21, 2023
    Configuration menu
    Copy the full SHA
    44a8624 View commit details
    Browse the repository at this point in the history