Author Topic: Paste would subtract one from numbers  (Read 527 times)

MAatHome

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Paste would subtract one from numbers
« on: May 15, 2023, 05:00:12 PM »
Using SlickEdit Pro 2022 (v27.0.0.6 64-bit Qt5)

I would have code that contained numbers ... as in uint16_t or just a zero (0) and paste would subtract 1 from the number change it to uint15_t and -1.

Pretty weird!

Was this fixed in v27.0.2?

thanks,
Mike.

MAatHome

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Paste would subtract one from numbers
« Reply #1 on: May 15, 2023, 06:38:42 PM »
The answer is no, it was not fixed, it just re-occurred. I did not get sufficient docuementation - I believe it is a combination of copy/paste and p/<shift>p in vi mode.


patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Paste would subtract one from numbers
« Reply #2 on: May 15, 2023, 07:41:25 PM »
In the default vim emulation, vi-decrement is bound to Ctrl-X.  You can go to Tools -> Options -> Keyboard and Mouse -> Key Bindings, and type "vi-decrement" into the "Seach by command" box to see where it is bound.  You can remove the binding there.

I removed vi-decrement for my personal bindings, I would accidentally hit Ctrl-X in the window sometimes, and it was annoying if I didn't notice it immediately.   


MAatHome

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Paste would subtract one from numbers
« Reply #3 on: May 15, 2023, 10:51:45 PM »
Wow! Did not know about this functionality.

Thank you.
Mike.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2899
  • Hero Points: 153
Re: Paste would subtract one from numbers
« Reply #4 on: May 16, 2023, 03:49:53 PM »
If you ever need to in SlickEdit, you can column select a group of numbers and type "add" on the SlickEdit command line to get the result.