Minor fixes
This commit is contained in:
@ -794,11 +794,12 @@ func NewDetailsEdit(com *common.Common, task *taskwarrior.Task) *detailsEdit {
|
|||||||
// return nil
|
// return nil
|
||||||
// }
|
// }
|
||||||
|
|
||||||
vp := viewport.New(40, 30)
|
vp := viewport.New(com.Width(), 40-com.Styles.ColumnFocused.GetVerticalFrameSize())
|
||||||
ta := textarea.New()
|
ta := textarea.New()
|
||||||
ta.SetWidth(40)
|
ta.SetWidth(70)
|
||||||
ta.SetHeight(30)
|
ta.SetHeight(40 - com.Styles.ColumnFocused.GetVerticalFrameSize() - 2)
|
||||||
ta.ShowLineNumbers = false
|
ta.ShowLineNumbers = false
|
||||||
|
ta.FocusedStyle.CursorLine = lipgloss.NewStyle()
|
||||||
ta.Focus()
|
ta.Focus()
|
||||||
if task.Udas["details"] != nil {
|
if task.Udas["details"] != nil {
|
||||||
ta.SetValue(task.Udas["details"].(string))
|
ta.SetValue(task.Udas["details"].(string))
|
||||||
|
|||||||
@ -120,19 +120,25 @@ func (t *Task) GetString(fieldWFormat string) string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(t.Annotations) == 0 {
|
if t.Udas["details"] != nil && t.Udas["details"] != "" {
|
||||||
return t.Description
|
return fmt.Sprintf("%s [D]", t.Description)
|
||||||
} else {
|
} else {
|
||||||
// var annotations []string
|
return t.Description
|
||||||
// for _, a := range t.Annotations {
|
|
||||||
// annotations = append(annotations, a.String())
|
|
||||||
// }
|
|
||||||
// return fmt.Sprintf("%s\n%s", t.Description, strings.Join(annotations, "\n"))
|
|
||||||
|
|
||||||
// TODO enable support for multiline in table
|
|
||||||
return fmt.Sprintf("%s [%d]", t.Description, len(t.Annotations))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if len(t.Annotations) == 0 {
|
||||||
|
// return t.Description
|
||||||
|
// } else {
|
||||||
|
// // var annotations []string
|
||||||
|
// // for _, a := range t.Annotations {
|
||||||
|
// // annotations = append(annotations, a.String())
|
||||||
|
// // }
|
||||||
|
// // return fmt.Sprintf("%s\n%s", t.Description, strings.Join(annotations, "\n"))
|
||||||
|
|
||||||
|
// // TODO enable support for multiline in table
|
||||||
|
// return fmt.Sprintf("%s [%d]", t.Description, len(t.Annotations))
|
||||||
|
// }
|
||||||
|
|
||||||
case "project":
|
case "project":
|
||||||
switch format {
|
switch format {
|
||||||
case "parent":
|
case "parent":
|
||||||
|
|||||||
Reference in New Issue
Block a user