summary refs log tree commit diff stats
Commit message (Expand)AuthorAgeFilesLines
* Initialize an empty message map in the message store on initializationRafael Castillo2019-12-071-2/+3
* Revert "Parse headers from template"Drew DeVault2019-12-041-39/+3
* Fix crash when no message is selectedWiktor Kwapisiewicz2019-12-041-1/+4
* Parse headers from templateRobert Günzler2019-12-041-3/+39
* Fix crash if there is no to address for %FThorben Günther2019-11-251-1/+1
* widgets/terminal: Reap more zombiesKevin Kuehler2019-11-211-0/+1
* Update version to 0.3.0 0.3.0Drew DeVault2019-11-211-1/+1
* Install aerc-templatesSrivathsan Murali2019-11-191-0/+1
* Parse Reply-To header while parsing envelopeSrivathsan Murali2019-11-171-0/+5
* Allow fields in compose widget to be clickedGreg Anders2019-11-171-2/+32
* commands/account: Disable :view for deleted msgsKevin Kuehler2019-11-171-1/+2
* Complete the F rune.Srivathsan Murali2019-11-174-6/+27
* Add UI options to save/pipe messages with unsupported mimetypesGreg Anders2019-11-177-123/+163
* Check for terminal before forwarding mouse eventGreg Anders2019-11-171-1/+1
* worker/imap: Fix seqMap race conditionKevin Kuehler2019-11-101-1/+3
* Correct capitalization in quoted_replyDrew DeVault2019-11-103-16/+40
* Add some defaults for template optionsDrew DeVault2019-11-103-5/+15
* Add Templates with ParsingSrivathsan Murali2019-11-1014-143/+510
* widgets/msgviewer: Don't crash if pager is nilKevin Kuehler2019-11-101-1/+1
* Add support for AUTH LOGIN submissionLuke Drummond2019-11-014-1/+10
* Notmuch: be resilient to config errorsReto Brunner2019-11-011-3/+22
* notmuch: ignore comments and blank lines when processing query-map fileMatt Snider2019-11-011-0/+4
* widgets/msgview: Reap the filter commandKevin Kuehler2019-10-161-0/+1
* Cleanup pager processes after closing a msgviewerKevin Kuehler2019-10-162-0/+18
* Fix: oauthbearer runtime errorFrode Aannevik2019-10-161-6/+7
* lib/msgstore: fix invalid callback invocationReto Brunner2019-10-141-1/+1
* Fix tab refocus on removeJeffas2019-10-141-8/+14
* Fix pushing invalid tabs to historyJeffas2019-10-141-1/+4
* Revert "Show spinner when fetching contents"Drew DeVault2019-10-092-9/+3
* Preserve sorting order in search resultsJeffas2019-10-092-0/+18
* Show spinner when fetching contentsJeffas2019-10-092-3/+9
* Fix selected account to return for messageviewerJeffas2019-10-021-4/+6
* Open mailto links in a new aerc instance if needed.Reto Brunner2019-09-291-2/+17
* Print success to socket if no error was thrownHeiko Carrasco2019-09-291-1/+5
* Config for deleting message from message viewerSrivathsan Murali2019-09-204-25/+37
* Sort path completionsJeffas2019-09-201-0/+3
* Change search flagsJeffas2019-09-203-6/+22
* Make commands join args with spacesJeffas2019-09-209-66/+60
* notmuch: add sort functionalityReto Brunner2019-09-201-6/+41
* Add documentation for sortJeffas2019-09-203-0/+43
* Add sorting functionalityJeffas2019-09-209-8/+491
* Add directory info messagesJeffas2019-09-181-16/+55
* Focus new tab after removeJeffas2019-09-181-0/+4
* Revert "Fix out-of-order messages by sorting as we display"Drew DeVault2019-09-182-32/+1
* Add search documentation for maildir backendJeffas2019-09-161-0/+16
* Add basic searching to the maildir backendJeffas2019-09-162-1/+260
* notmuch: implement ModifyLabelsReto Brunner2019-09-161-26/+61
* notmuch: sync maildir flagsReto Brunner2019-09-163-2/+7
* notmuch: extract all notmuch db operations.Reto Brunner2019-09-163-175/+250
* Add completion for copyJeffas2019-09-121-1/+2
an> At(row, col int) *GridCell { cell.Row = row cell.Column = col return cell } func (cell *GridCell) Span(rows, cols int) *GridCell { cell.RowSpan = rows cell.ColSpan = cols return cell } func (grid *Grid) Rows(spec []GridSpec) *Grid { grid.rows = spec return grid } func (grid *Grid) Columns(spec []GridSpec) *Grid { grid.columns = spec return grid } func (grid *Grid) Children() []Drawable { grid.mutex.RLock() defer grid.mutex.RUnlock() children := make([]Drawable, len(grid.cells)) for i, cell := range grid.cells { children[i] = cell.Content } return children } func (grid *Grid) Draw(ctx *Context) { invalid := grid.invalid if invalid { grid.reflow(ctx) } grid.mutex.RLock() defer grid.mutex.RUnlock() for _, cell := range grid.cells { cellInvalid := cell.invalid.Load().(bool) if !cellInvalid && !invalid { continue } rows := grid.rowLayout[cell.Row : cell.Row+cell.RowSpan] cols := grid.columnLayout[cell.Column : cell.Column+cell.ColSpan] x := cols[0].Offset y := rows[0].Offset width := 0 height := 0 for _, col := range cols { width += col.Size } for _, row := range rows { height += row.Size } subctx := ctx.Subcontext(x, y, width, height) cell.Content.Draw(subctx) } } func (grid *Grid) reflow(ctx *Context) { grid.rowLayout = nil grid.columnLayout = nil flow := func(specs *[]GridSpec, layouts *[]gridLayout, extent int) { exact := 0 weight := 0 nweights := 0 for _, spec := range *specs { if spec.Strategy == SIZE_EXACT { exact += spec.Size } else if spec.Strategy == SIZE_WEIGHT { nweights += 1 weight += spec.Size } } offset := 0 for _, spec := range *specs { layout := gridLayout{Offset: offset} if spec.Strategy == SIZE_EXACT { layout.Size = spec.Size } else if spec.Strategy == SIZE_WEIGHT { size := float64(spec.Size) / float64(weight) size *= float64(extent - exact) layout.Size = int(math.Floor(size)) } offset += layout.Size *layouts = append(*layouts, layout) } } flow(&grid.rows, &grid.rowLayout, ctx.Height()) flow(&grid.columns, &grid.columnLayout, ctx.Width()) grid.invalid = false } func (grid *Grid) invalidateLayout() { grid.invalid = true grid.DoInvalidate(grid) } func (grid *Grid) Invalidate() { grid.invalidateLayout() grid.mutex.RLock() for _, cell := range grid.cells { cell.Content.Invalidate() } grid.mutex.RUnlock() } func (grid *Grid) AddChild(content Drawable) *GridCell { cell := &GridCell{ RowSpan: 1, ColSpan: 1, Content: content, } grid.mutex.Lock() grid.cells = append(grid.cells, cell) grid.mutex.Unlock() cell.Content.OnInvalidate(grid.cellInvalidated) cell.invalid.Store(true) grid.invalidateLayout() return cell } func (grid *Grid) RemoveChild(content Drawable) { grid.mutex.Lock() for i, cell := range grid.cells { if cell.Content == content { grid.cells = append(grid.cells[:i], grid.cells[i+1:]...) break } } grid.mutex.Unlock() grid.invalidateLayout() } func (grid *Grid) cellInvalidated(drawable Drawable) { var cell *GridCell grid.mutex.RLock() for _, cell = range grid.cells { if cell.Content == drawable { break } cell = nil } grid.mutex.RUnlock() if cell == nil { panic(fmt.Errorf("Attempted to invalidate unknown cell")) } cell.invalid.Store(true) grid.DoInvalidate(grid) }