Skip to main content

cursor position changes after punctuation

Completed

Comments

21 comments

  • Fletcher Penney

    That sounds like a conflict with another application, or with something in your macOS text replacements?  I am not familiar with karabiner-Elements or CapsLock.  Try turning them off to see where the issue is.

     

    The only time nvUltra moves the insertion point is with smart pairs, or the period "typeover" functionality.  But in both cases it moves the insertion point forwards, not backwards.

    0
  • Brett

    For the record I use Karabiner with the caps lock mod, and I haven't experienced this behavior.

     

    I'm assuming when you say "in all text editors" that you've had plenty of evidence that this is only happening in nvUltra, correct? You might try disabling some of the Preferences->Editing features to see if you can narrow it down to a specific cause.

    0
  • Tthkbw

    I have done some more testing on this issue and I think I may have found the problem. It is simple to reproduce, and seems to happen only in nvUltra. For example, I tested this using Textedit, Multimarkdown Composer, and nvAlt.

    To show the issue, simply type the letters 'm' 'a' 'c' followed immediately by a '-'. The word "mac" should be typed as a word, that is, it should be preceded by a space or at the beginning of a line. When the hyphen is typed, that signals the end of a word, and macOS autocorrects this to "Mac", which moves the cursor around. nvUltra does not account for this and leaves the cursor positioned at the end of the autocorrection, in front of the hyphen.

    All autocorrections fail like this in nvUltra (on my system). Spaces also terminate words, and nvUltra places the cursor in front of the space after an autocorrection which results in an autocorrected word lacking a following space.

    Other apps, like Multimarkdown Composer and nvAlt, handle this properly, so it seems like it must be something in the nvUltra code. 

    Karabiner Elements is a keyboard modification program. Bret is familiar with it, as it was an article he wrote that first directed me to it. It certainly is a possible culprit in this, so I tested this both with and without Karabiner Elements active. It made no difference. 

     

    0
  • Kevin Arthur

    I've seen this too, on two different installs on different Macs. Where I'm seeing it happen right now is when I type a "[" or "(" or other "smart pair." It displays the closing "]" but then the cursor jumps left by half a character.

    0
  • Fletcher Penney

    When I type `foo mac-` I get `foo mac-`

    0
  • Brett

    Fletcher, do you have autocorrect enabled? I haven't been able to test this either because my system isn't correcting mac to Mac, but the bug sounds like it's related to autocorrected words. Can you replicate with any word?

    0
  • Fletcher Penney

    Brett -- yes.  I enabled it and generally have it enabled.

    0
  • Tthkbw

    From my testing, it requires autocorrect, but, although the failure is frequent, it doesn't always happen. However, I have no problem reproducing the problem by just type "Mac-" over and over again. I also see failures with semicolon and space, as I indicated earlier. 

    Here is a copy of some testing I just did in nvUltra. I repeatedly typed "mac;" at the beginning of a line, then return. So, if the failure occurred, the cursor would be positioned to the left of semicolon when I hit return and the line would have only the corrected word "Mac" on it. If the failure didn't occur, then the line would have the corrected word "Mac;" on it. if there are failures, there are a few semicolons at the end of the lines typed.

    I then repeated the test typing "mac-". 

    Mac
    Mac;
    Mac;
    Mac
    Mac
    Mac;
    Mac;
    Mac;
    Mac
    ;;;;

    Mac
    Mac
    Mac
    Mac
    Mac
    Mac
    Mac
    Mac
    Mac
    ---------

    As you can see, with the semicolon, it worked correctly a couple of times. With the hyphen, it failed every time. 

    My system is a 2018 Mac mini running 10.14.6.

    0
  • Tthkbw

    So I guess no one else has seen this problem or reproduced it. Disappointing, as it is so frequent on my system. I have played with various preference settings in nvUltra, and with the exception of turning off autocorrect, I can't get rid of the problem. As I said previously, Karabiner Elements, which I also use, would be a likely culprit, but I have tried disabling it more than once and it has no effect on the frequency of the problem. 

    I am the same poor typist in all the text editors I use frequently, and I never see the problem anywhere but nvUltra. I extensively use nvAlt, MultiMarkdown Composer, and Scrivener. I occasionally use TextEdit and Pages as well. In all of these, autocorrect is enabled but I never see this problem. As a side note, in Pages, typing "mac-" doesn't actually trigger the autocorrect to "Mac". However, typing "stuf-" triggers an autocorrect to "stuff-" without the cursor positioning error. 

    Thanks for listening.

     

    0
  • Fletcher Penney

    I revisited this today, and set up multiple macOS shortcuts and tried multiple typos.  I was unable to get this to recur.

     

    Are you still having this problem in v 0.37?

    0
  • Tthkbw

    Yes, v 0.37 doesn't change anything. I made a screen recording of the failure. If you want to see it, let me know how to get it to you.

    I am also now running Catalina, 10.15 with the most recent supplemental update. Changing to Catalina had no effect. 

    0
  • Fletcher Penney

    You can send a video via the "Submit a request" link in the upper right.

    0
  • Tthkbw

    Also, for what it's worth, I set up some text replacements in System Preferences/keyboard. Those custom shortcuts also show the same problem.  

    0
  • Fletcher Penney

    What shortcuts did you configure?  I couldn't get that to replicate the issue.

    0
  • Tthkbw

    I used the "Submit a request" link to send you a link to a screen video of this problem in action. Also in that request, I attached a screenshot of my text replacements that don't work. A simple shortcut that showed the problem for me was to use the shortcut semicolon followed by 'a' as a shortcut for 'Arturo'. I believe that all shortcuts are vulnerable to this problem in nvUltra, but it does not happen every time they are used. 

    I have upgraded to nvUltra Beta 38 and I still see this problem very consistently.

    I also tested nvUltra Beta on a new user on the same Mac--that is, a user I created with admin privileges, but without the installation of various things I use, like Karabiner Elements and other potential complications. Logging in as that user, I still see the problem and it is unchanged from my experiences described here. I did verify that Karabiner Elements was not active for that user.

     

    0
  • Fletcher Penney

    Thanks for the video.  The distinction is that you appear not to be typing "mac-".  You are typing "mac", waiting for the autocorrect popup to appear, and *then* hitting "-".  Hitting this causes the correction to occur, and then to move the cursor to the left of the "-" character.

     

    If you type "mac-", then the autocorrection works correctly. (I am using "boook" which gets corrected to "book", but using the rules I describe here the same result happens.)

     

    If I do it this way, I can replicate it.  And if I can replicate it, I can fix it.  ;)

    0
  • Fletcher Penney

    Should be fixed for next release.  Thanks again for the video!

    0
  • Tthkbw

    Ha! Good catch! The timing does appear to be the key to causing the problem. Glad there's a fix coming--thanks!

     

    0
  • Tthkbw

    This is fixed in version 1.0.0 40. Since I make such extensive use of autocorrection this problem caused me to go away from nvUltra for a time because of all the random problems depending on how fast I was typing and how responsive the system was at any particular time. 

    I am happy camper now and have gone back to nvUltra and love it, particularly in combination with 1Writer for iOS and with my folders stored on Dropbox. Thanks to Brett for mentioning using 1Writer--the combination works well.

    0
  • Fletcher Penney

    Glad it’s working better for you!!

    Thanks again for the video to help diagnose the problem.

    0
  • Brett

    Great to hear!

    0

Please sign in to leave a comment.

Powered by Zendesk