aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-08-26 19:39:43 +0200
committerjoe <rbo@gmx.us>2025-08-26 19:39:56 +0200
commit9dba169925b0dad326552420128ca2106dab1716 (patch)
tree69e06d88a48499ab55e9e6dc5b484f37865ca392
parentfixed all errs and some other things (diff)
downloadhardflip-9dba169925b0dad326552420128ca2106dab1716.tar.gz
hardflip-9dba169925b0dad326552420128ca2106dab1716.tar.bz2
hardflip-9dba169925b0dad326552420128ca2106dab1716.tar.xz
hardflip-9dba169925b0dad326552420128ca2106dab1716.tar.zst
hardflip-9dba169925b0dad326552420128ca2106dab1716.zip
k
-rw-r--r--src/c_defs.go3
-rw-r--r--src/c_fuzz.go56
-rw-r--r--src/e_keys.go18
-rw-r--r--src/i_ui.go1
4 files changed, 58 insertions, 20 deletions
diff --git a/src/c_defs.go b/src/c_defs.go
index d1bc32b..ec8b447 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -82,8 +82,7 @@ const (
INSERT_MODE
RENAME_MODE
HELP_MODE
- FUZZ_MODE
- MODE_MAX = FUZZ_MODE
+ MODE_MAX = HELP_MODE
)
const (
diff --git a/src/c_fuzz.go b/src/c_fuzz.go
new file mode 100644
index 0000000..5b59297
--- /dev/null
+++ b/src/c_fuzz.go
@@ -0,0 +1,56 @@
+/*
+ * ========================
+ * ===== ===============
+ * ====== ================
+ * ====== ================
+ * ====== ==== ==== ==
+ * ====== === == = =
+ * ====== === = == =
+ * = === === = == ====
+ * = === === = == = =
+ * == ===== ==== ==
+ * ========================
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 2023-2024, Joe
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the organization nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * hardflip: src/c_fuzz.go
+ * Tue, 26 Aug 2025 19:32:25 +0200
+ * Joe
+ *
+ * search with fzf otherwise shitty search
+ */
+
+package main
+
+func c_fuzz(data *HardData) {
+ // TODO: here
+}
diff --git a/src/e_keys.go b/src/e_keys.go
index 4fb0acc..fa3ca9c 100644
--- a/src/e_keys.go
+++ b/src/e_keys.go
@@ -250,7 +250,7 @@ func e_normal_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
} else if (event.Rune() == '/' ||
event.Key() == tcell.KeyCtrlF) &&
data.litems.curr != nil {
- // ui.mode = FUZZ_MODE
+ c_fuzz(data)
// TODO: fzf here
} else if event.Rune() == '?' {
ui.mode = HELP_MODE
@@ -884,19 +884,3 @@ func e_help_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
}
return false
}
-
-func e_fuzz_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
- if event.Key() == tcell.KeyEscape ||
- event.Key() == tcell.KeyCtrlC {
- ui.s.HideCursor()
- ui.mode = NORMAL_MODE
- ui.buff.empty()
- return true
- } else if event.Key() == tcell.KeyEnter {
- ui.s.HideCursor()
- ui.mode = NORMAL_MODE
- ui.buff.empty()
- } else {
- }
- return false
-}
diff --git a/src/i_ui.go b/src/i_ui.go
index 653f333..e824908 100644
--- a/src/i_ui.go
+++ b/src/i_ui.go
@@ -837,7 +837,6 @@ func i_ui(data_dir string) {
INSERT_MODE: e_insert_events,
RENAME_MODE: e_rename_events,
HELP_MODE: e_help_events,
- FUZZ_MODE: e_fuzz_events,
}
for {
data.ui.s.Clear()