Skip to content

Commit

Permalink
add require macro command
Browse files Browse the repository at this point in the history
  • Loading branch information
taviso committed Aug 27, 2022
1 parent 050396b commit 7472f3d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions macro/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ static const char *kFunctionKeys[UINT8_MAX] = {
[107] = "Menu Bar",
[109] = "Block Move",
[110] = "Block Copy",
[125] = "Mouse Event",
};

#endif
2 changes: 1 addition & 1 deletion macro/macros/ellipsis.mac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#pragma title Periods to Ellipsis

/* If we're not editing a document, do nothing */
passthru_key_unless(STATE_NORMAL)
require(STATE_NORMAL, {original key})

/* Lookup what character is left of the cursor */
if (quote(leftchar()) = quote(.))
Expand Down
2 changes: 1 addition & 1 deletion macro/macros/emdash.mac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#pragma title Double Dash To Typographic Emdash

/* If we're not editing a document, do nothing */
passthru_key_unless(STATE_NORMAL)
require(STATE_NORMAL, {original key})

/* Lookup what character is left of the cursor */
if (quote(leftchar()) = quote(CODE_HYPHEN))
Expand Down
2 changes: 1 addition & 1 deletion macro/macros/tdquotes.mac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#pragma title Typographic Double Quotes

/* If we're not editing a document, do nothing */
passthru_key_unless(STATE_NORMAL)
require(STATE_NORMAL, {original key})

/* Lookup what character is left of the cursor */
case (quote(leftchar()))
Expand Down
2 changes: 1 addition & 1 deletion macro/macros/tsquotes.mac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#pragma title Typographic Single Quotes

/* If we're not editing a document, do nothing */
passthru_key_unless(STATE_NORMAL)
require(STATE_NORMAL, {original key})

/* Lookup what character is left of the cursor */
case (quote(leftchar()))
Expand Down

0 comments on commit 7472f3d

Please sign in to comment.