mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-05 15:32:49 +00:00
cli: add config option for built-in pager's ruler
This commit is contained in:
parent
6e5f0297e2
commit
001801a3b1
@ -55,6 +55,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
* `jj absorb` can now squash a deleted file if it was added by one of the
|
||||
destination revisions.
|
||||
|
||||
* Added `ui.streampager.show-ruler` setting to configure whether the ruler should be
|
||||
shown when the builtin pager starts up.
|
||||
|
||||
### Fixed bugs
|
||||
|
||||
* Fixed crash on change-delete conflict resolution.
|
||||
|
@ -141,6 +141,11 @@
|
||||
"none"
|
||||
],
|
||||
"default": "anywhere"
|
||||
},
|
||||
"show-ruler": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the ruler should start visible",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -43,6 +43,7 @@ edit = false
|
||||
[ui.streampager]
|
||||
interface = "quit-if-one-page"
|
||||
wrapping = "anywhere"
|
||||
show-ruler = true
|
||||
|
||||
[snapshot]
|
||||
max-new-file-size = "1MiB"
|
||||
|
@ -83,6 +83,7 @@ impl UiOutput {
|
||||
let streampager_config = streampager::config::Config {
|
||||
wrapping_mode: config.wrapping.into(),
|
||||
interface_mode: config.streampager_interface_mode(),
|
||||
show_ruler: config.show_ruler,
|
||||
// We could make scroll-past-eof configurable, but I'm guessing people
|
||||
// will not miss it. If we do make it configurable, we should mention
|
||||
// that it's a bad idea to turn this on if `interface=quit-if-one-page`,
|
||||
@ -297,6 +298,7 @@ impl From<StreampagerWrappingMode> for streampager::config::WrappingMode {
|
||||
struct StreampagerConfig {
|
||||
interface: StreampagerAlternateScreenMode,
|
||||
wrapping: StreampagerWrappingMode,
|
||||
show_ruler: bool,
|
||||
// TODO: Add an `quit-quickly-delay-seconds` floating point option or a
|
||||
// `quit-quickly-delay` option that takes a 's' or 'ms' suffix. Note that as
|
||||
// of this writing, floating point numbers do not work with `--config`
|
||||
|
@ -763,6 +763,16 @@ interface = "full-screen-clear-output"
|
||||
interface = "quit-quickly-or-clear-output"
|
||||
```
|
||||
|
||||
#### Showing the ruler on startup
|
||||
|
||||
```toml
|
||||
[ui.streampager]
|
||||
# Start with the ruler showing
|
||||
show-ruler = true # (default)
|
||||
# Start with the ruler hidden
|
||||
show-ruler = false
|
||||
```
|
||||
|
||||
|
||||
### Processing contents to be paged
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user