Show More
@@ -113,7 +113,7 b' def create_ipython_shortcuts(shell):' | |||
|
113 | 113 | c = buf[i] |
|
114 | 114 | if c == quote: |
|
115 | 115 | paired = not paired |
|
116 |
elif c == |
|
|
116 | elif c == "\\": | |
|
117 | 117 | i += 1 |
|
118 | 118 | i += 1 |
|
119 | 119 | return paired |
@@ -127,16 +127,19 b' def create_ipython_shortcuts(shell):' | |||
|
127 | 127 | return _preceding_text_cache[pattern] |
|
128 | 128 | |
|
129 | 129 | if callable(pattern): |
|
130 | ||
|
130 | 131 | def _preceding_text(): |
|
131 | 132 | app = get_app() |
|
132 | 133 | before_cursor = app.current_buffer.document.current_line_before_cursor |
|
133 | 134 | return bool(pattern(before_cursor)) |
|
135 | ||
|
134 | 136 | else: |
|
135 | 137 | m = re.compile(pattern) |
|
136 | 138 | |
|
137 | 139 | def _preceding_text(): |
|
138 | 140 | app = get_app() |
|
139 |
|
|
|
141 | before_cursor = app.current_buffer.document.current_line_before_cursor | |
|
142 | return bool(m.match(before_cursor)) | |
|
140 | 143 | |
|
141 | 144 | condition = Condition(_preceding_text) |
|
142 | 145 | _preceding_text_cache[pattern] = condition |
General Comments 0
You need to be logged in to leave comments.
Login now