Drew DeVault
db213fd0ae
Implement :copy (aka :cp)
2019-05-14 16:44:59 -04:00
Drew DeVault
2c486cb7f5
Update tab name as subject changes
...
Also moves truncation to the tab widget
2019-05-14 16:18:59 -04:00
Drew DeVault
065da5e372
Add $EDITOR, internal config for compose
2019-05-14 15:25:30 -04:00
Drew DeVault
f77d7c2c3d
Add distinct keybindings for each compose view
2019-05-14 14:27:28 -04:00
Drew DeVault
29de3297a1
Implement sending emails /o/
2019-05-14 14:07:27 -04:00
Drew DeVault
6c36e04c1f
Add :send-message, prepares & writes email to /tmp
2019-05-14 13:07:48 -04:00
Drew DeVault
3ace4ef732
Handle external message deletions
2019-05-13 20:23:23 -04:00
Drew DeVault
026e8a17ca
Handle incoming emails gracefully
2019-05-13 20:16:55 -04:00
Drew DeVault
bb46b2b7e1
Spec out review message screen
2019-05-13 16:53:02 -04:00
Drew DeVault
17bd2dc4db
Populate "From" header from config for new emails
2019-05-13 16:04:01 -04:00
Drew DeVault
f37508a539
Implement :{next,prev}-field in compose view
2019-05-12 11:21:28 -04:00
Drew DeVault
2a4dd5cb87
Expand compose focus handling a bit
2019-05-12 00:38:48 -04:00
Drew DeVault
577248f5e1
Add initial compose widget
2019-05-12 00:06:09 -04:00
Drew DeVault
71c13c9078
"Press any key to close" for completed processes
2019-05-11 14:15:29 -04:00
Drew DeVault
72e4b5e2b2
Refactor ctx stashing out of exline
2019-05-11 13:20:29 -04:00
Drew DeVault
8fa4583230
Split ex line text handling into dedicated widget
2019-05-11 13:12:44 -04:00
Simon Ser
a275f65848
lib/msgstore: protect with a mutex
...
MessageStore has a lot of exported fields that can be read from the outside.
Each read must be protected, because a call from Update could happen at any
time.
2019-04-29 09:49:48 -04:00
Simon Ser
f1698a337e
widgets/msglist: fix MessageList.store race
...
This field could be written to in the middle of a Draw call, which reads it
multiple times. Use an atomic variable instead.
2019-04-29 09:49:39 -04:00
Simon Ser
5685a17674
lib/ui: introduce Invalidatable
...
Many Drawable implementations have their own Invalidate and OnInvalidate
functions, with an unexported onInvalidate field. However OnInvalidate and
Invalidate are usually not called in the same goroutine. This results in a race
on this field, e.g.:
Read at 0x00c000094748 by goroutine 7:
git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1()
/home/simon/src/aerc2/widgets/dirlist.go:85 +0x56
git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1()
/home/simon/src/aerc2/widgets/spinner.go:93 +0x1bb
Previous write at 0x00c000094748 by main goroutine:
[failed to restore the stack]
Goroutine 7 (running) created at:
git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start()
/home/simon/src/aerc2/widgets/spinner.go:46 +0x8f
git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList()
/home/simon/src/aerc2/widgets/dirlist.go:37 +0x286
git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView()
/home/simon/src/aerc2/widgets/account.go:50 +0x5ca
git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc()
/home/simon/src/aerc2/widgets/aerc.go:60 +0x800
main.main()
/home/simon/src/aerc2/aerc.go:65 +0x33e
To fix this, introduce a new type, Invalidatable, which protects the field.
Unfortunately the Drawable must be passed to the callback function in
Invalidate, so we still need to re-implement this in each Invalidatable user.
2019-04-27 14:30:28 -04:00
Simon Ser
2159eb876e
widgets/spinner: fix Spinner.frame race
...
It's accessed by the goroutine which increments it and the goroutine that draws
the widget at the same time. Use atomic instead.
Write at 0x00c00000ebc0 by goroutine 7:
git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1()
/home/simon/src/aerc2/widgets/spinner.go:50 +0x169
Previous read at 0x00c00000ebc0 by main goroutine:
[failed to restore the stack]
Goroutine 7 (running) created at:
git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start()
/home/simon/src/aerc2/widgets/spinner.go:44 +0x8b
git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList()
/home/simon/src/aerc2/widgets/dirlist.go:37 +0x286
git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView()
/home/simon/src/aerc2/widgets/account.go:50 +0x5ca
git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc()
/home/simon/src/aerc2/widgets/aerc.go:60 +0x800
main.main()
/home/simon/src/aerc2/aerc.go:65 +0x33e
2019-04-27 11:42:12 -04:00
Drew DeVault
2925bdfd6c
Re-render terminal on invalidate
2019-04-15 16:07:05 -04:00
Tom Lebreux
3cd0d5bc28
Fix segfault on :view-message for unloaded message
...
This also fixes segfault on :view-message on empty directory
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-10 15:40:06 -04:00
Gokberk Yaltirakli
ec09ec8b0e
Lowercase MIME types while matching filters
2019-04-07 14:12:19 -04:00
Drew DeVault
4bc8ea34bc
Clear damage on each terminal.Draw call
2019-04-05 20:11:31 -04:00
Tom Lebreux
399d014bff
Fix wrong row due to typo
...
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-05 20:10:28 -04:00
Tom Lebreux
41212a717e
Fix infinite loop on empty DirectoryContents
...
When changing to an empty directory, ml.selected is 0, and the length
of ml.store.Uids is 0. The loop condition is always true so we have
an infinite loop causing 100% CPU usage and prevents us to change to
other directories.
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-05 15:24:00 -04:00
Drew DeVault
8a42dfc87c
Show (no messages) for empty folders
2019-04-04 14:25:51 -04:00
Drew DeVault
315cdf308a
Remove extra debug statement
2019-03-31 15:21:33 -04:00
Drew DeVault
36419d85aa
Use shell to execute filters, fix non-determinism
2019-03-31 15:21:04 -04:00
Drew DeVault
8e5ed2a161
Implement header-regex-match filters
2019-03-31 14:42:18 -04:00
Drew DeVault
f9262e4b06
Improve error handling in message viewer
...
Still not great but at least it tells you when something went wrong
2019-03-31 14:32:26 -04:00
Drew DeVault
bbdf9df75e
Add basic filter implementation
2019-03-31 14:24:53 -04:00
Drew DeVault
711d22891b
Decode messages before rendering them
2019-03-31 13:36:37 -04:00
Drew DeVault
0abafa60e1
Make message viewer real, part two
2019-03-31 12:35:51 -04:00
Drew DeVault
27b25174e2
Make the message viewer real, part one
2019-03-31 12:14:37 -04:00
Drew DeVault
5d0402aeea
Add message view commands, :close
2019-03-30 21:45:41 -04:00
Drew DeVault
4bdc0f3715
Minor refactoring to header view
2019-03-30 16:50:14 -04:00
Drew DeVault
fd27a2baf6
Fix crash on command not found
2019-03-30 16:29:52 -04:00
Drew DeVault
78db7ccafa
Use bold instead of inverted for header names
2019-03-30 15:59:42 -04:00
Drew DeVault
337dd18c9c
Add multipart selector mockup to msgviewer
2019-03-30 15:55:21 -04:00
Drew DeVault
fa04a1e036
Add basic message viewer mockup
2019-03-30 14:12:04 -04:00
Drew DeVault
2958579ee7
Correct color of error messages
2019-03-30 13:05:00 -04:00
Drew DeVault
84965d680c
Use tcell.Style.Reverse instead of black on white
2019-03-30 12:59:18 -04:00
Drew DeVault
700dea23fa
Implement :pipe
2019-03-30 11:58:24 -04:00
Drew DeVault
4465646fed
Show deleted emails pending server ack in grey
...
TODO: Don't let the user select or interact with deleted messages
2019-03-30 10:41:12 -04:00
Drew DeVault
77ede6eb5a
Add body fetching support code
2019-03-29 22:36:15 -04:00
Drew DeVault
e591221509
Expire status errors on input
2019-03-21 21:34:12 -04:00
Drew DeVault
a602891768
term: don't mess with cursor when unfocused
2019-03-21 21:28:51 -04:00
Drew DeVault
960d11c4bc
Enable alt screen on built-in terminal
2019-03-21 21:24:23 -04:00
Drew DeVault
15b856abcc
Make terminal closure thread safe
2019-03-21 21:23:30 -04:00
Drew DeVault
be2918a616
Use GetCursorPos instead of stored position
2019-03-21 21:19:34 -04:00
Drew DeVault
d97cdde38d
Skip writes if term is closed
2019-03-21 21:07:49 -04:00
Drew DeVault
0b26241b42
Improve cursor handling in embedded terminal
2019-03-21 21:00:03 -04:00
Drew DeVault
55ad16bb70
Fix cursor handling in embedded terminal
2019-03-21 19:56:47 -04:00
Drew DeVault
28f393bdbd
Forward key events to child terminal
2019-03-21 19:50:54 -04:00
Drew DeVault
699f1cf7a6
Use : for keybindings even when ex is overridden
2019-03-21 17:49:59 -04:00
Drew DeVault
6d01332b55
Rig up terminal keybinding group
2019-03-21 17:44:44 -04:00
Drew DeVault
4130956b4c
Use user's configured ex key
2019-03-21 17:40:50 -04:00
Drew DeVault
f5bf4a9324
Add context-specific keybindings
2019-03-21 17:37:19 -04:00
Drew DeVault
312a53e5ff
Implement :delete-message
2019-03-20 23:23:38 -04:00
Drew DeVault
f3d3e0ed4f
moar colors
2019-03-17 18:06:15 -04:00
Drew DeVault
c0146efaae
Fix scrolling issues on :select-message
2019-03-17 17:51:14 -04:00
Drew DeVault
9ff815bb13
s/:term-close/:close/g
2019-03-17 17:45:44 -04:00
Drew DeVault
60b17c473a
Wrap Terminal in TermHost
2019-03-17 17:39:49 -04:00
Drew DeVault
dee0f8938b
Add :term-close
2019-03-17 17:23:53 -04:00
Drew DeVault
16c3f0a893
Handle terminal title, login shell
2019-03-17 17:08:54 -04:00
Drew DeVault
14cb8cb51f
Implement :next-tab, :prev-tab
2019-03-17 16:24:17 -04:00
Drew DeVault
589db742cb
Move exline handling up to aerc, add :term
2019-03-17 16:19:15 -04:00
Drew DeVault
9e28a02f6a
commands: handle case where no account selected
2019-03-17 14:57:05 -04:00
Drew DeVault
bd71787e3f
Fix terminal colors; wait until tty size is known
2019-03-17 14:54:25 -04:00
Drew DeVault
1170893e39
Add basic terminal widget
2019-03-17 14:02:33 -04:00
Drew DeVault
13ba53c9d0
Implement :select-message
2019-03-15 22:01:20 -04:00
Drew DeVault
52a97c02ae
Implement scrolling in message list
2019-03-15 21:49:40 -04:00
Drew DeVault
e780c6ee96
Implement :next-message n%
2019-03-15 21:41:39 -04:00
Drew DeVault
ef6178a12a
Move MessageStore into its own file
2019-03-15 21:36:06 -04:00
Drew DeVault
77c76ba462
Implement default in accounts.conf
2019-03-15 21:33:08 -04:00
Drew DeVault
a729179f9f
Implement sidebar-width config option
2019-03-15 20:40:28 -04:00
Drew DeVault
9e3b602ce7
Fix nil dereference on rapidly cycling folders
2019-03-15 01:48:36 -04:00
Drew DeVault
24dfc47126
Rig up key bindings
2019-03-15 01:46:14 -04:00
Drew DeVault
8d20e9218e
Implement key bindings subsystem
...
Which is not yet rigged up
2019-03-15 01:31:23 -04:00
Drew DeVault
d274bf926c
widgets/directories.go -> widgets/dirlist.go
2019-03-14 23:45:06 -04:00
Drew DeVault
24daef89e0
Implement :{next,prev}-message
2019-03-14 23:41:25 -04:00
Drew DeVault
4c8feb9aa5
Invalidate when UIDs finish downloading
2019-03-14 23:31:56 -04:00
Drew DeVault
4ec7f5dea5
Use cached message store when re-opening dirs
2019-03-14 22:41:43 -04:00
Drew DeVault
62946ff6c5
Implement :cd command
2019-03-14 22:34:34 -04:00
Drew DeVault
de364846cc
Display message subjects in message list
2019-03-14 22:19:04 -04:00
Drew DeVault
11f0a7267f
Implement message store side of message fetching
2019-03-14 21:51:29 -04:00
Drew DeVault
0f8b7a1203
Lay out message list widget basic design
2019-03-14 21:37:00 -04:00
Drew DeVault
b3896476a0
Fetch valid UIDs from server after opening dir
2019-03-10 23:45:00 -04:00
Drew DeVault
289e3b09ea
Improve error reporting
2019-03-10 21:26:53 -04:00
Drew DeVault
d394fd1f3b
Flesh out command parsing & handling
2019-03-10 21:23:22 -04:00
Drew DeVault
b60999c39e
Start building out command subsystem
2019-03-10 21:15:24 -04:00
Elias Naur
607ece8302
Fix build
2019-02-10 17:11:19 -05:00
Drew DeVault
12284487b4
Implement Container interface in widgets/
2019-01-20 15:08:30 -05:00
Drew DeVault
8492a21a51
Send commands up to the top-level aerc widget
2019-01-14 08:14:03 -05:00
Drew DeVault
d35213eaab
Add cursor handling in ex line
2019-01-14 08:07:24 -05:00
Drew DeVault
a409a9faa5
Handle errors from worker initialization
2019-01-13 20:06:18 -05:00
Drew DeVault
c047b068c2
Swap message list placeholder for spinner
2019-01-13 20:04:18 -05:00
Drew DeVault
a782b709d1
Add loading spinner
2019-01-13 20:02:21 -05:00
Drew DeVault
f87fe502a6
Handle connection errors properly
2019-01-13 19:41:21 -05:00
Drew DeVault
2750f99a60
Issue IMAP SELECT command
2019-01-13 16:18:10 -05:00
Drew DeVault
cf66462000
Simplify approach to directory list
...
This doesn't really need to be abstract tbh
2019-01-13 15:32:52 -05:00
Drew DeVault
257affcd48
Revert "Add abstract list, update dirlist accordingly"
...
This reverts commit 3157897c1a
.
2019-01-13 15:27:56 -05:00
Drew DeVault
24196d2c6f
Revert "Render selected list item differently"
...
This reverts commit 60284850f2
.
2019-01-13 15:27:48 -05:00
Drew DeVault
60284850f2
Render selected list item differently
2019-01-13 15:12:52 -05:00
Drew DeVault
3157897c1a
Add abstract list, update dirlist accordingly
2019-01-13 15:10:47 -05:00
Drew DeVault
755aa9af73
Filter dirlist according to user config
2019-01-13 14:32:22 -05:00
Drew DeVault
2349b7de86
Add directory list widget
2019-01-13 14:26:46 -05:00
Drew DeVault
c286d3da6b
Move ex line into account
2019-01-13 13:33:43 -05:00
Drew DeVault
b76deea963
Move status line into account, update behavior
2019-01-13 13:25:56 -05:00
Drew DeVault
0fee2d6f97
Remove old account widget
2019-01-13 13:03:46 -05:00
Drew DeVault
0911cd5050
Initialize worker in account widget
2019-01-13 13:03:28 -05:00
Drew DeVault
648ca983f6
Add basic account widget, populate real acct views
2019-01-13 12:39:06 -05:00
Drew DeVault
1265d9cff8
Apply gofmt
2018-06-12 09:50:46 -04:00
Drew DeVault
6728a11fdf
Apply gofmt
2018-06-11 20:04:21 -04:00
Drew DeVault
1c41b63f08
Move sidebar into account tabs
...
This is accomplished through a bit of a hack, the statusbar is able to
be a child of multiple dudes
2018-06-11 19:23:09 -04:00
Markus Ongyerth
80e891a802
switch to tcell from termbox
...
This is a simple mostly straight forward switch to tcell in favor of
termbox.
It uses the tcell native api (not the compat layer) but does not make
use of most features.
Further changes should include moving to tcell's views.TextArea and the
general built in widget behaviour instead of the current ad hoc
implementation.
Regression: Cursor isn't shown in ex-line
2018-06-01 16:04:43 -07:00
Drew DeVault
cea98463c9
Summon exline on demand
2018-02-27 21:33:47 -05:00
Drew DeVault
30c85dd4ab
Push commands to the status stack
2018-02-27 21:29:50 -05:00
Drew DeVault
cab3771e17
Pull main aerc UI into widget
2018-02-27 21:17:26 -05:00
Drew DeVault
a073d7613f
Add statusline widget
2018-02-27 21:02:56 -05:00
Drew DeVault
384fe0d826
Make ex line fully unicode aware
2018-02-27 16:46:14 -05:00
Drew DeVault
1418e1b9dc
Split UI library and widgets
2018-02-26 22:54:39 -05:00