Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

"0" should go to the start of the line #14

Open
perrycate opened this issue Apr 22, 2015 · 2 comments
Open

"0" should go to the start of the line #14

perrycate opened this issue Apr 22, 2015 · 2 comments

Comments

@perrycate
Copy link

This might be trickier than some of the other issues due to the way Libreoffice handles Line endings, but hopefully there's a way since "$" works fine.

@tblancher
Copy link

I second this motion. Also, "|" (pipe) should go to the first character of the line, unless preceded by a count (column number), which then jumps to that character on the line.

@McKael
Copy link

McKael commented Nov 4, 2015

This patch should add 0 as an alias to the ^ key:

commit d5c3f176cbbf09c22eb3898f04137d9f66b9cb3f
Author: Mikael Berthe <[email protected]>
Date:   Wed Nov 4 18:33:45 2015 +0100

    Add 0 to jump to the first character of the line

diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs
index 1d6e8c5..9f55bb0 100644
--- a/src/vibreoffice.vbs
+++ b/src/vibreoffice.vbs
@@ -425,7 +425,10 @@ Function ProcessNumberKey(oEvent)
     dim c
     c = CStr(oEvent.KeyChar)

-    If c >= "0" and c <= "9" Then
+    If c > "0" and c <= "9" Then
+        addToMultiplier(CInt(c))
+        ProcessNumberKey = True
+    ElseIf c = "0" and getRawMultiplier() > 0 Then
         addToMultiplier(CInt(c))
         ProcessNumberKey = True
     Else
@@ -934,7 +937,7 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers)
         bSetCursor = False
     ' ----------

-    ElseIf keyChar = "^" Then
+    ElseIf keyChar = "0" or keyChar = "^" Then
         getCursor().gotoStartOfLine(bExpand)
         bSetCursor = False
     ElseIf keyChar = "$" Then

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants