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

Rework filetype change, reload command and autosave #3343

Merged
merged 21 commits into from
Aug 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9afcb80
action/command: Let `reload` really reload the `settings.json`
JoeKar Jun 18, 2024
7f6e5bc
action/command: On `reload` check and inform about errors
JoeKar Jul 22, 2024
c51f848
action/command: On `reload` prevent overwriting `settings.json`
JoeKar Jul 21, 2024
c67a30e
action/command: On `reload` prevent overwriting volatile settings
JoeKar Aug 11, 2024
62c1c66
buffer/settings: On `filetype` change remove the following steps
JoeKar Jul 16, 2024
521b63a
buffer/settings: On `filetype` change reload parsed local settings only
JoeKar Jun 17, 2024
c741e36
action/command: Prevent setting of unchanged option
JoeKar Jul 23, 2024
395d848
buffer/settings: Prevent setting of unchanged option
JoeKar Jul 23, 2024
4663927
config: Refactor parsed option handling
JoeKar Jul 23, 2024
f661b64
config/settings: Remove duplicating `DefaultGlobalSettings()`
JoeKar Aug 11, 2024
0552959
action/command: Prevent overwriting settings set locally or by plugin
JoeKar Jul 26, 2024
724e294
action/command: On `reload` prevent overwriting local settings
JoeKar Aug 8, 2024
a3071b1
action/command: Refactor `reload` & the `filetype` change
JoeKar Aug 12, 2024
10511c9
buffer/buffer: Store `fileformat` in `LocalSettings` on auto detection
JoeKar Aug 8, 2024
0542765
action/command: Simplify `ResetCmd`
JoeKar Aug 8, 2024
a678d42
plugins/comment: Don't write to `b.Settings` directly
JoeKar Aug 11, 2024
832c7de
config: Remove unused `GetAutoTime()`
JoeKar Jun 19, 2024
4170df8
config: Use `float64` within the `autosave` processing
JoeKar Jun 19, 2024
8b31dc7
config: Rework `autosave` to be rearmed upon change
JoeKar Jun 24, 2024
33b7c9d
config: Don't truncate `float64` to `int`
JoeKar Jul 15, 2024
b80ea93
config: Correct typo in `validatePositiveValue()`
JoeKar Jul 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
action/command: On reload prevent overwriting local settings
  • Loading branch information
JoeKar committed Aug 18, 2024
commit 724e29446fba0c327415f5e13be3b9646afa69cd
4 changes: 4 additions & 0 deletions internal/action/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ func reloadRuntime(reloadPlugins bool) {
for _, b := range buffer.OpenBuffers {
config.InitLocalSettings(b.Settings, b.Path)
for k, v := range b.Settings {
if _, ok := b.LocalSettings[k]; ok {
// reload should not override local settings
continue
}
b.DoSetOptionNative(k, v)
}
b.UpdateRules()
Expand Down