@@ -334,7 +334,9 @@ func (ov *OpenMessageView) incrementalSearch(ctx context.Context, inlines []stri
334334 defer func () { ov .inIncrementalSearch = false }()
335335 ov .incrementalQuery = ""
336336
337- ov .Draw (lines , 0 )
337+ if err := ov .Draw (lines , 0 ); err != nil {
338+ log .Infof ("Failed to draw: %v" , err )
339+ }
338340 ov .screen .Draw ()
339341
340342 found := 0
@@ -497,7 +499,9 @@ func (ov *OpenMessageView) Run(ctx context.Context) (*MessageViewOp, error) {
497499 ov .screen .Clear ()
498500
499501 // TODO: double check that scroll is not too high after `lines` was recreated.
500- ov .Draw (lines , scroll )
502+ if err := ov .Draw (lines , scroll ); err != nil {
503+ log .Infof ("Failed to draw: %v" , err )
504+ }
501505 case key , ok := <- ov .keys .Chan ():
502506 if ! ok {
503507 log .Errorf ("OpenMessage: Input channel closed!" )
@@ -513,7 +517,9 @@ func (ov *OpenMessageView) Run(ctx context.Context) (*MessageViewOp, error) {
513517 ov .update <- struct {}{}
514518 }()
515519 case "?" , input .F1 :
516- help (openMessageViewHelp , ov .keys )
520+ if err := help (openMessageViewHelp , ov .keys ); err != nil {
521+ log .Infof ("help() failed: %v" , err )
522+ }
517523 case "*" :
518524 if ov .msg .HasLabel (cmdg .Starred ) {
519525 if err := ov .msg .RemoveLabelID (ctx , cmdg .Starred ); err != nil {
@@ -593,7 +599,7 @@ func (ov *OpenMessageView) Run(ctx context.Context) (*MessageViewOp, error) {
593599 return OpNext (), nil
594600 case "U" :
595601 if err := ov .msg .AddLabelID (ctx , cmdg .Unread ); err != nil {
596- //nolint:staticcheck
602+ //lint:ignore ST1005 UI-facing message intentionally starts with capital
597603 ov .errors <- fmt .Errorf ("Failed to mark unread : %v" , err )
598604 } else {
599605 return nil , nil
@@ -614,17 +620,17 @@ func (ov *OpenMessageView) Run(ctx context.Context) (*MessageViewOp, error) {
614620 ov .Draw (lines , scroll )
615621 case "f" :
616622 if err := forward (ctx , conn , ov .keys , ov .msg ); err != nil {
617- //nolint:staticcheck
623+ //lint:ignore ST1005 UI-facing message intentionally starts with capital
618624 ov .errors <- fmt .Errorf ("Failed to forward: %v" , err )
619625 }
620626 case "r" :
621627 if err := reply (ctx , conn , ov .keys , ov .msg ); err != nil {
622- //nolint:staticcheck
628+ //lint:ignore ST1005 UI-facing message intentionally starts with capital
623629 ov .errors <- fmt .Errorf ("Failed to reply: %v" , err )
624630 }
625631 case "a" :
626632 if err := replyAll (ctx , conn , ov .keys , ov .msg ); err != nil {
627- //nolint:staticcheck
633+ //lint:ignore ST1005 UI-facing message intentionally starts with capital
628634 ov .errors <- fmt .Errorf ("Failed to replyAll: %v" , err )
629635 }
630636 case "H" :
@@ -717,7 +723,11 @@ func (ov *OpenMessageView) showRaw(ctx context.Context) error {
717723
718724func (ov * OpenMessageView ) showPager (ctx context.Context , content string ) error {
719725 ov .keys .Stop ()
720- defer ov .keys .Start ()
726+ defer func () {
727+ if err := ov .keys .Start (); err != nil {
728+ log .Infof ("Failed to restart input: %v" , err )
729+ }
730+ }()
721731
722732 cmd := exec .CommandContext (ctx , pagerBinary )
723733 cmd .Stdin = strings .NewReader (content )
0 commit comments