Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #130 from guillermooo/null-reg

bypass registers if using the null register (:_)
  • Loading branch information...
commit 04e8e095345808ea0e3fa8f6392270c86244f1a9 2 parents 6fca78e + c64bb0a
@sublimehq authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 vintage.py
View
11 vintage.py
@@ -8,6 +8,7 @@
# Registers are used for clipboards and macro storage
g_registers = {}
+REGISTER_NULL = '_'
# Represents the current input state. The primary commands that interact with
# this are:
@@ -831,6 +832,11 @@ def run(self, edit, register = '"', repeat = 1):
'register': register})
def set_register(view, register, forward):
+ if register == REGISTER_NULL:
+ # This is the null register; do nothing.
+ # More info in Vim: :help "_
+ return
+
delta = 1
if not forward:
delta = -1
@@ -865,6 +871,11 @@ def set_register(view, register, forward):
g_registers[reg] = text
def get_register(view, register):
+ if register == REGISTER_NULL:
+ # This is the null register; do nothing.
+ # More info in Vim: :help "_
+ return
+
use_sys_clipboard = view.settings().get('vintage_use_clipboard', False) == True
register = register.lower()
if register == '%':
Please sign in to comment.
Something went wrong with that request. Please try again.