about summary refs log tree commit diff stats
path: root/source_edit.lua
diff options
context:
space:
mode:
Diffstat (limited to 'source_edit.lua')
-rw-r--r--source_edit.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/source_edit.lua b/source_edit.lua
index 1d82596..ab2fa33 100644
--- a/source_edit.lua
+++ b/source_edit.lua
@@ -311,7 +311,7 @@ function edit.keychord_pressed(State, chord, key)
       -- printable character created using shift key => delete selection
       -- (we're not creating any ctrl-shift- or alt-shift- combinations using regular/printable keys)
       (not App.shift_down() or utf8.len(key) == 1) and
-      chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and backspace ~= 'delete' and not App.is_cursor_movement(chord) then
+      chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and backspace ~= 'delete' and not App.is_cursor_movement(chord) then
     Text.delete_selection(State, State.left, State.right)
   end
   if State.search_term then
@@ -417,6 +417,9 @@ function edit.keychord_pressed(State, chord, key)
       schedule_save(State)
     end
   -- clipboard
+  elseif chord == 'C-a' then
+    State.selection1 = {line=1, pos=1}
+    State.cursor1 = {line=#State.lines, pos=utf8.len(State.lines[#State.lines].data)+1, posB=nil}
   elseif chord == 'C-c' then
     local s = Text.selection(State)
     if s then
href='#n110'>110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207