Config for deleting message from message viewer
As suggested in #268, this adds a behaviour setting for deleting message from message viewer.
This commit is contained in:
parent
043a02d99d
commit
1bedb8fe06
|
@ -47,7 +47,7 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
store.Next()
|
||||
if isMsgView {
|
||||
nextMsg := store.Selected()
|
||||
if nextMsg == msg {
|
||||
if nextMsg == msg || !aerc.Config().Ui.NextMessageOnDelete {
|
||||
aerc.RemoveTab(widget)
|
||||
acct.Messages().Scroll()
|
||||
} else {
|
||||
|
|
|
@ -57,6 +57,11 @@ dirlist-format=%n %>r
|
|||
# Default: ""
|
||||
sort=
|
||||
|
||||
# Moves to next message when the current message is deleted
|
||||
#
|
||||
# Default: false
|
||||
next-message-on-delete=true
|
||||
|
||||
[viewer]
|
||||
#
|
||||
# Specifies the pager to use when displaying emails. Note that some filters
|
||||
|
|
|
@ -37,6 +37,7 @@ type UIConfig struct {
|
|||
SpinnerDelimiter string `ini:"spinner-delimiter"`
|
||||
DirListFormat string `ini:"dirlist-format"`
|
||||
Sort []string `delim:" "`
|
||||
NextMessageOnDelete bool `ini:"next-message-on-delete"`
|
||||
}
|
||||
|
||||
const (
|
||||
|
@ -356,6 +357,7 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
|
|||
Spinner: "[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] ",
|
||||
SpinnerDelimiter: ",",
|
||||
DirListFormat: "%n %>r",
|
||||
NextMessageOnDelete: true,
|
||||
},
|
||||
|
||||
Viewer: ViewerConfig{
|
||||
|
|
|
@ -150,6 +150,11 @@ These options are configured in the *[ui]* section of aerc.conf.
|
|||
| %>X
|
||||
: make format specifier 'X' be right justified
|
||||
|
||||
*next-message-on-delete*
|
||||
Moves to next message when the current message is deleted
|
||||
|
||||
Default: true
|
||||
|
||||
## VIEWER
|
||||
|
||||
These options are configured in the *[viewer]* section of aerc.conf.
|
||||
|
|
Loading…
Reference in New Issue