merged #53 manually; todoapp must ignore empty input lines
This commit is contained in:
parent
068c30c97d
commit
a90efe752d
2 changed files with 5 additions and 2 deletions
|
|
@ -41,6 +41,7 @@ proc updateEntry(pos: int, content: cstring, completed: bool) =
|
||||||
markAsCompleted(pos, completed)
|
markAsCompleted(pos, completed)
|
||||||
|
|
||||||
proc onTodoEnter(ev: Event; n: VNode) =
|
proc onTodoEnter(ev: Event; n: VNode) =
|
||||||
|
if n.value.strip() != "":
|
||||||
addEntry(n.value, false)
|
addEntry(n.value, false)
|
||||||
n.value = ""
|
n.value = ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ proc split*(s, sep: cstring): seq[cstring] {.importcpp, nodecl.}
|
||||||
|
|
||||||
proc split*(s, sep: cstring; max: int): seq[cstring] {.importcpp, nodecl.}
|
proc split*(s, sep: cstring; max: int): seq[cstring] {.importcpp, nodecl.}
|
||||||
|
|
||||||
|
proc strip*(s: cstring): cstring {.importcpp: "#.trim()", nodecl.}
|
||||||
|
|
||||||
proc startsWith*(a, b: cstring): bool {.importcpp: "startsWith", nodecl.}
|
proc startsWith*(a, b: cstring): bool {.importcpp: "startsWith", nodecl.}
|
||||||
proc contains*(a, b: cstring): bool {.importcpp: "(#.indexOf(#)>=0)", nodecl.}
|
proc contains*(a, b: cstring): bool {.importcpp: "(#.indexOf(#)>=0)", nodecl.}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue