composeEditorValue builds the textarea seed text. Empty notes seed as an empty string so the cursor lands on row 1, not row 3.
(title, body string)
| 37 | // composeEditorValue builds the textarea seed text. Empty notes seed as |
| 38 | // an empty string so the cursor lands on row 1, not row 3. |
| 39 | func composeEditorValue(title, body string) string { |
| 40 | if title == "" && body == "" { |
| 41 | return "" |
| 42 | } |
| 43 | if body == "" { |
| 44 | return title |
| 45 | } |
| 46 | return title + "\n\n" + body |
| 47 | } |
| 48 | |
| 49 | func editBodyWidth(rect Rect) int { |
| 50 | w := rect.W - 4 |