Skip to content

Commit

Permalink
bypass registers if using the null register (:_)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermooo committed May 19, 2012
1 parent eedf53a commit c64bb0a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vintage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 == '%':
Expand Down

0 comments on commit c64bb0a

Please sign in to comment.