about summary refs log tree commit diff stats
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-04-12 12:18:51 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-04-12 12:18:51 +0200
commit7be6158c80af09daf58e9b873263d9e98e36aff9 (patch)
tree92df19a83f9044e696c423b0184ede925cc4e648 /src/ui/window.c
parent61df0c8e8513a1aa9912e37019a63778ec3ed06c (diff)
downloadprofani-tty-7be6158c80af09daf58e9b873263d9e98e36aff9.tar.gz
Set C99 standard in configure
We already use uint_32 from stdint.h which AFAIK is C99.
I seem to remember there is more C99 in the code. Let's explicitly
define it here.

Also fixes build for https://github.com/boothj5/profanity/pull/1053
Diffstat (limited to 'src/ui/window.c')
0 files changed, 0 insertions, 0 deletions
t;sir@cmpwn.com> 2019-06-11 09:34:48 -0400 commands/msgview: Add next/prev commands' href='/akspecs/aerc/commit/commands/msgview/next.go?h=0.3.0&id=9746f4858c6b21673a85a19df3ff8b8e076c36d5'>9746f48 ^
2a09617 ^
507c905 ^



9746f48 ^


507c905 ^


9746f48 ^









1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42


               
                                                   


                                          

                         
             








                                                                           

 
                                                                       



                                                         


                                                            


                                                                









                                                                               
package msgview

import (
	"git.sr.ht/~sircmpwn/aerc/commands/account"
	"git.sr.ht/~sircmpwn/aerc/widgets"
)

type NextPrevMsg struct{}

func init() {
	register(NextPrevMsg{})
}

func (_ NextPrevMsg) Aliases() []string {
	return []string{"next", "next-message", "prev", "prev-message"}
}

func (_ NextPrevMsg) Complete(aerc *widgets.Aerc, args []string) []string {
	return nil
}

func (_ NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error {
	err, n, pct := account.ParseNextPrevMessage(args)
	if err != nil {
		return err
	}
	mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
	acct := mv.SelectedAccount()
	store := mv.Store()
	err = account.ExecuteNextPrevMessage(args, acct, pct, n)
	if err != nil {
		return err
	}
	nextMsg := store.Selected()
	if nextMsg == nil {
		aerc.RemoveTab(mv)
		return nil
	}
	nextMv := widgets.NewMessageViewer(acct, aerc.Config(), store, nextMsg)
	aerc.ReplaceTab(mv, nextMv, nextMsg.Envelope.Subject)
	return nil
}