]> git.lizzy.rs Git - micro.git/commitdiff
Update todolist
authorZachary Yedidia <zyedidia@gmail.com>
Sat, 16 Apr 2016 13:58:11 +0000 (09:58 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Sat, 16 Apr 2016 13:58:11 +0000 (09:58 -0400)
src/search.go
todolist.md

index de96b6b5770435d0c88ab0c64f922e04e0ebb309..ec1fe783faaeaab59bb8e064e02f6fdd6dfcc83e 100644 (file)
@@ -6,12 +6,14 @@ import (
        "strings"
 )
 
+// BeginSearch starts a search
 func BeginSearch() {
        searching = true
        messenger.hasPrompt = true
        messenger.Message("Find: ")
 }
 
+// EndSearch stops the current search
 func EndSearch() {
        searching = false
        messenger.hasPrompt = false
@@ -19,6 +21,8 @@ func EndSearch() {
        messenger.Reset()
 }
 
+// HandleSearchEvent takes an event and a view and will do a real time match from the messenger's output
+// to the current buffer. It searches down the buffer.
 func HandleSearchEvent(event tcell.Event, v *View) {
        switch e := event.(type) {
        case *tcell.EventKey:
index 4b5a00e24de4a3c501c7a2231d1a692299b0ade6..ce1daa321032b63a53d1d77ab3a03e5c05ca77ce 100644 (file)
@@ -6,10 +6,6 @@
 
 - [ ] Documentation
 
-- [ ] Search and replace
-    - [ ] Search
-    - [x] Replace
-
 - [ ] Multiple views
     - [ ] Horizontal splits
     - [ ] Vertical splits
 
 - [x] Line numbers
 
+- [x] Search and replace
+    - [x] Search
+    - [x] Replace
+
 - [x] Simple tests
     - [x] Stack test
     - [x] Util test