Merge lp:vigedit into lp:~tristil/vigedit/main-method
- vigedit-additions
- Merge into main-method
Proposed by
Lauri Niskanen
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:vigedit |
Merge into: | lp:~tristil/vigedit/main-method |
Diff against target: |
738 lines (+363/-81) (has conflicts) 14 files modified
install.py (+161/-0) src/ViGedit/actions/ex.py (+10/-0) src/ViGedit/actions/lines.py (+13/-1) src/ViGedit/actions/others.py (+37/-5) src/ViGedit/actions/text.py (+18/-10) src/ViGedit/actions/trace.py (+2/-2) src/ViGedit/bindings/__init__.py (+2/-1) src/ViGedit/bindings/base.py (+4/-0) src/ViGedit/bindings/capture.py (+37/-13) src/ViGedit/bindings/command.py (+27/-18) src/ViGedit/bindings/visual.py (+3/-1) src/ViGedit/static.py (+1/-1) src/ViGedit/vi.py (+47/-29) src/ViGedit/vigtk.py (+1/-0) Text conflict in install.py |
To merge this branch: | bzr merge lp:vigedit |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joseph Method | Pending | ||
Review via email: mp+18518@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Lauri Niskanen (ape3000) wrote : | # |
lp:vigedit
updated
- 69. By Stephen Moore <iambob@iambob-laptop>
-
made it so that if there is already a count underway, 0 won't go to the start of the line and actually add to the count
- 70. By Stephen Moore <iambob@iambob-laptop>
-
fixed capture mode
- 71. By Stephen Moore <iambob@iambob-laptop>
-
fixed ex mode
- 72. By Stephen Moore <iambob@iambob-laptop>
-
made deleting the first line of the document remove the line as well
- 73. By Stephen Moore <iambob@iambob-laptop>
-
more fixes to deleting on first line
- 74. By Stephen <iambob@iambob-desktop>
-
rewrote install.py to take some arguements specifying where to install plugins and what plugins to install
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'AUTHORS' (properties changed: -x to +x) | |||
2 | === modified file 'ChangeLog' (properties changed: -x to +x) | |||
3 | === modified file 'TODO' (properties changed: -x to +x) | |||
4 | === modified file 'data/autotab.gedit-plugin' (properties changed: -x to +x) | |||
5 | === modified file 'data/vigedit.gedit-plugin' (properties changed: -x to +x) | |||
6 | === modified file 'docs/chart.png' (properties changed: -x to +x) | |||
7 | === modified file 'docs/chart.svg' (properties changed: -x to +x) | |||
8 | === modified file 'docs/documentation.odt' (properties changed: -x to +x) | |||
9 | === modified file 'docs/documentation.pdf' (properties changed: -x to +x) | |||
10 | === modified file 'gpl.txt' (properties changed: -x to +x) | |||
11 | === modified file 'install.py' (properties changed: -x to +x) | |||
12 | --- install.py 2009-07-10 19:55:25 +0000 | |||
13 | +++ install.py 2010-02-05 03:26:13 +0000 | |||
14 | @@ -1,6 +1,7 @@ | |||
15 | 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
16 | 2 | 2 | ||
17 | 3 | import os | 3 | import os |
18 | 4 | <<<<<<< TREE | ||
19 | 4 | from distutils.file_util import * | 5 | from distutils.file_util import * |
20 | 5 | from distutils.dir_util import * | 6 | from distutils.dir_util import * |
21 | 6 | 7 | ||
22 | @@ -29,3 +30,163 @@ | |||
23 | 29 | # Considering integration with other plugins | 30 | # Considering integration with other plugins |
24 | 30 | # install_plugin("classbrowser") | 31 | # install_plugin("classbrowser") |
25 | 31 | 32 | ||
26 | 33 | ======= | ||
27 | 34 | import sys | ||
28 | 35 | import shutil | ||
29 | 36 | from distutils.dir_util import copy_tree | ||
30 | 37 | class Complaint(Exception): pass | ||
31 | 38 | |||
32 | 39 | class Installer(object): | ||
33 | 40 | def __init__(self, base=None, plugins=None): | ||
34 | 41 | |||
35 | 42 | self.availablePlugins = ['ViGedit', 'autotab'] | ||
36 | 43 | |||
37 | 44 | try: | ||
38 | 45 | if not base: | ||
39 | 46 | self.base = os.sep.join([os.environ['HOME'], '.gnome2', 'gedit']) | ||
40 | 47 | else: | ||
41 | 48 | self.flag_base(base) | ||
42 | 49 | |||
43 | 50 | if not plugins: | ||
44 | 51 | self.plugins = [p for p in self.availablePlugins] | ||
45 | 52 | else: | ||
46 | 53 | self.flag_plugins(plugins) | ||
47 | 54 | |||
48 | 55 | except Complaint, c: | ||
49 | 56 | self.error(c) | ||
50 | 57 | |||
51 | 58 | self.flags = ( | ||
52 | 59 | (['--help', '-h'], "Show help", self.flag_help, False), | ||
53 | 60 | (['--base', '-b'], "Specify folder that holds plugins folder (default : %s)" % base, self.flag_base, True), | ||
54 | 61 | ( | ||
55 | 62 | ['--plugins', '-p'], | ||
56 | 63 | "Comma seperated list of desired plugins to install (available : %s)" % ','.join(self.availablePlugins), | ||
57 | 64 | self.flag_plugins, | ||
58 | 65 | True | ||
59 | 66 | ), | ||
60 | 67 | ) | ||
61 | 68 | |||
62 | 69 | self.register = {} | ||
63 | 70 | for flags, _, func, needsArg in self.flags: | ||
64 | 71 | for flag in flags: | ||
65 | 72 | self.register[flag] = (func, needsArg) | ||
66 | 73 | |||
67 | 74 | def error(self, error): | ||
68 | 75 | print "\nERROR : %s\n" % error | ||
69 | 76 | exit() | ||
70 | 77 | |||
71 | 78 | def copy(self, plugin, src, dest): | ||
72 | 79 | if os.path.exists(src): | ||
73 | 80 | if os.path.isdir(src): | ||
74 | 81 | print "Copying directory %s to %s" % (src, dest) | ||
75 | 82 | pluginFolder = os.sep.join([dest, plugin]) | ||
76 | 83 | if not os.path.exists(pluginFolder): | ||
77 | 84 | os.mkdir(pluginFolder) | ||
78 | 85 | |||
79 | 86 | copy_tree(src, pluginFolder) | ||
80 | 87 | else: | ||
81 | 88 | print "Copying file %s to %s" % (src, dest) | ||
82 | 89 | shutil.copy(src, dest) | ||
83 | 90 | |||
84 | 91 | else: | ||
85 | 92 | raise Complaint("%s doesn't exist" % src) | ||
86 | 93 | |||
87 | 94 | ######################## | ||
88 | 95 | ### FLAGS | ||
89 | 96 | ######################## | ||
90 | 97 | |||
91 | 98 | def flag_help(self, arg=None): | ||
92 | 99 | print "Usage : python install.py [options]" | ||
93 | 100 | print "-----------------------------------" | ||
94 | 101 | lines = [] | ||
95 | 102 | for flags, message, _, _ in self.flags: | ||
96 | 103 | lines.append((', '.join(flags), message)) | ||
97 | 104 | |||
98 | 105 | l1 = max(len(flags) for flags, _ in lines) | ||
99 | 106 | s = "%%-%ds : %%s" % l1 | ||
100 | 107 | for flags, message in lines: | ||
101 | 108 | print s % (flags, message) | ||
102 | 109 | |||
103 | 110 | exit() | ||
104 | 111 | |||
105 | 112 | def flag_base(self, arg): | ||
106 | 113 | self.base = arg | ||
107 | 114 | |||
108 | 115 | def flag_plugins(self, arg): | ||
109 | 116 | plugins = [p.lstrip().rstrip().lower() for p in arg.split(',')] | ||
110 | 117 | |||
111 | 118 | if not plugins: | ||
112 | 119 | raise Complaint("You need to install atleast one plugin") | ||
113 | 120 | |||
114 | 121 | available = dict([(p.lower(), p) for p in self.availablePlugins]) | ||
115 | 122 | matched = [] | ||
116 | 123 | |||
117 | 124 | #ensuring correct case | ||
118 | 125 | for plugin in plugins: | ||
119 | 126 | if plugin in available.keys(): | ||
120 | 127 | matched.append(available[plugin]) | ||
121 | 128 | else: | ||
122 | 129 | raise Complaint("%s is not an available plugin" % plugin) | ||
123 | 130 | |||
124 | 131 | self.plugins = matched | ||
125 | 132 | |||
126 | 133 | ######################## | ||
127 | 134 | ### INSTALLER | ||
128 | 135 | ######################## | ||
129 | 136 | |||
130 | 137 | def install(self): | ||
131 | 138 | pluginDir = os.sep.join([self.base, 'plugins']) | ||
132 | 139 | if not os.path.exists(pluginDir): | ||
133 | 140 | os.makedirs(pluginDir) | ||
134 | 141 | |||
135 | 142 | for plugin in self.plugins: | ||
136 | 143 | # copy gedit-plugin file | ||
137 | 144 | geditPluginFile = os.sep.join(['data', '%s.gedit-plugin' % plugin.lower()]) | ||
138 | 145 | self.copy(plugin, geditPluginFile, pluginDir) | ||
139 | 146 | |||
140 | 147 | initFile = os.sep.join(['src', plugin, '__init__.py']) | ||
141 | 148 | singleFile = os.sep.join(['src', plugin, '%s.py' % plugin]) | ||
142 | 149 | |||
143 | 150 | if not os.path.exists(initFile): | ||
144 | 151 | # installing a single file | ||
145 | 152 | self.copy(plugin, singleFile, pluginDir) | ||
146 | 153 | |||
147 | 154 | else: | ||
148 | 155 | #installing directory | ||
149 | 156 | self.copy(plugin, os.sep.join(['src', plugin]), pluginDir) | ||
150 | 157 | |||
151 | 158 | ######################## | ||
152 | 159 | ### MAIN | ||
153 | 160 | ######################## | ||
154 | 161 | |||
155 | 162 | def main(self): | ||
156 | 163 | args = sys.argv[1:] | ||
157 | 164 | index = 0 | ||
158 | 165 | try: | ||
159 | 166 | while index < len(args): | ||
160 | 167 | flag = args[index] | ||
161 | 168 | if flag.startswith('-'): | ||
162 | 169 | if flag in self.register: | ||
163 | 170 | func, needsArg = self.register[flag] | ||
164 | 171 | if needsArg: | ||
165 | 172 | index += 1 | ||
166 | 173 | if index >= len(args): | ||
167 | 174 | raise Complaint("%s flag needs a following arguement" % flag) | ||
168 | 175 | func(args[index]) | ||
169 | 176 | else: | ||
170 | 177 | func() | ||
171 | 178 | else: | ||
172 | 179 | raise Complaint("%s is an unkown flag" % flag) | ||
173 | 180 | else: | ||
174 | 181 | raise Complaint("All arguements must be preceded by a flag. Try --help or -h") | ||
175 | 182 | |||
176 | 183 | index += 1 | ||
177 | 184 | |||
178 | 185 | self.install() | ||
179 | 186 | |||
180 | 187 | except Complaint, c: | ||
181 | 188 | self.error(c) | ||
182 | 189 | |||
183 | 190 | if __name__ == '__main__': | ||
184 | 191 | Installer().main() | ||
185 | 192 | >>>>>>> MERGE-SOURCE | ||
186 | 32 | 193 | ||
187 | === modified file 'src/ViGedit/__init__.py' (properties changed: -x to +x) | |||
188 | === modified file 'src/ViGedit/actions/__init__.py' (properties changed: -x to +x) | |||
189 | === modified file 'src/ViGedit/actions/blocks.py' (properties changed: -x to +x) | |||
190 | === modified file 'src/ViGedit/actions/ex.py' (properties changed: -x to +x) | |||
191 | --- src/ViGedit/actions/ex.py 2009-07-01 03:43:42 +0000 | |||
192 | +++ src/ViGedit/actions/ex.py 2010-02-05 03:26:13 +0000 | |||
193 | @@ -123,6 +123,16 @@ | |||
194 | 123 | terminal = act.others.getTerminal(act) | 123 | terminal = act.others.getTerminal(act) |
195 | 124 | terminal._vte.feed_child(terminalCommand + "\n") | 124 | terminal._vte.feed_child(terminalCommand + "\n") |
196 | 125 | 125 | ||
197 | 126 | @regexDec("printall") | ||
198 | 127 | def ex_PrintAll(act, command, result): | ||
199 | 128 | location = "%s/Desktop" % os.environ['HOME'] | ||
200 | 129 | act.others.printall(act, location) | ||
201 | 130 | |||
202 | 131 | @regexDec("printall (.+)") | ||
203 | 132 | def ex_PrintAllLoc(act, command, result): | ||
204 | 133 | location = result.group(1) | ||
205 | 134 | act.others.printall(act, location) | ||
206 | 135 | |||
207 | 126 | @regexDec(r's/(?P<search>(?:\\.|(?!/)[^\\])+)(/(?P<replace>(?:\\.|(?!/)[^\\])+)(/(?P<options>.+))?)?') | 136 | @regexDec(r's/(?P<search>(?:\\.|(?!/)[^\\])+)(/(?P<replace>(?:\\.|(?!/)[^\\])+)(/(?P<options>.+))?)?') |
208 | 127 | def ex_Search(act, command, result): | 137 | def ex_Search(act, command, result): |
209 | 128 | search = result.groupdict()['search'] | 138 | search = result.groupdict()['search'] |
210 | 129 | 139 | ||
211 | === modified file 'src/ViGedit/actions/fileOperations.py' (properties changed: -x to +x) | |||
212 | === modified file 'src/ViGedit/actions/insert.py' (properties changed: -x to +x) | |||
213 | === modified file 'src/ViGedit/actions/lines.py' (properties changed: -x to +x) | |||
214 | --- src/ViGedit/actions/lines.py 2009-06-30 02:54:14 +0000 | |||
215 | +++ src/ViGedit/actions/lines.py 2010-02-05 03:26:13 +0000 | |||
216 | @@ -16,6 +16,10 @@ | |||
217 | 16 | select_OneLine(act) | 16 | select_OneLine(act) |
218 | 17 | 17 | ||
219 | 18 | def select_OneLine(act): | 18 | def select_OneLine(act): |
220 | 19 | |||
221 | 20 | if act.mode == act.modes.visual: | ||
222 | 21 | act.bindings.mode = act.modes.command | ||
223 | 22 | |||
224 | 19 | act.pos.move_LineBegin(act) | 23 | act.pos.move_LineBegin(act) |
225 | 20 | 24 | ||
226 | 21 | cursor = act.pos.getIter(act) | 25 | cursor = act.pos.getIter(act) |
227 | @@ -27,6 +31,10 @@ | |||
228 | 27 | act.pos.moveInsert(act, cursor, True) | 31 | act.pos.moveInsert(act, cursor, True) |
229 | 28 | 32 | ||
230 | 29 | def select_ManyLines(act, number): | 33 | def select_ManyLines(act, number): |
231 | 34 | |||
232 | 35 | if act.mode == act.modes.visual: | ||
233 | 36 | act.bindings.mode = act.modes.command | ||
234 | 37 | |||
235 | 30 | if type(number) in (list, tuple): | 38 | if type(number) in (list, tuple): |
236 | 31 | try: | 39 | try: |
237 | 32 | number = int("".join(number)) | 40 | number = int("".join(number)) |
238 | @@ -35,8 +43,12 @@ | |||
239 | 35 | 43 | ||
240 | 36 | act.pos.move_LineBegin(act) | 44 | act.pos.move_LineBegin(act) |
241 | 37 | cursor = act.pos.getIter(act) | 45 | cursor = act.pos.getIter(act) |
242 | 46 | l1 = cursor.get_line() | ||
243 | 38 | cursor.forward_lines(number) | 47 | cursor.forward_lines(number) |
245 | 39 | 48 | l2 = cursor.get_line() | |
246 | 49 | if abs(l1 - l2) == number: | ||
247 | 50 | cursor.backward_char() | ||
248 | 51 | |||
249 | 40 | act.pos.moveInsert(act, cursor, True) | 52 | act.pos.moveInsert(act, cursor, True) |
250 | 41 | 53 | ||
251 | 42 | def getLinesTillEnd(act): | 54 | def getLinesTillEnd(act): |
252 | 43 | 55 | ||
253 | === modified file 'src/ViGedit/actions/others.py' (properties changed: -x to +x) | |||
254 | --- src/ViGedit/actions/others.py 2009-06-30 02:54:14 +0000 | |||
255 | +++ src/ViGedit/actions/others.py 2010-02-05 03:26:13 +0000 | |||
256 | @@ -1,8 +1,6 @@ | |||
257 | 1 | from gtk import PrintOperation, PageSetup | ||
258 | 2 | import gtksourceview2 | ||
259 | 1 | import gobject | 3 | import gobject |
260 | 2 | |||
261 | 3 | def nextSearchItem(act): | ||
262 | 4 | if act.vibase.doc.get_can_search_again(): | ||
263 | 5 | act.menus["searchNext"].activate() | ||
264 | 6 | 4 | ||
265 | 7 | def search(act): | 5 | def search(act): |
266 | 8 | act.vibase.view.emit("start_interactive_search") | 6 | act.vibase.view.emit("start_interactive_search") |
267 | @@ -22,4 +20,38 @@ | |||
268 | 22 | if len(notebook.get_children()) != 0: | 20 | if len(notebook.get_children()) != 0: |
269 | 23 | terminal = notebook.get_children()[1] | 21 | terminal = notebook.get_children()[1] |
270 | 24 | return terminal | 22 | return terminal |
272 | 25 | return None | 23 | return None |
273 | 24 | |||
274 | 25 | def redoLastOperation(act): | ||
275 | 26 | act.vibase.lastOperation(act) | ||
276 | 27 | |||
277 | 28 | def draw_page(operation, context, page_nr, compositor): | ||
278 | 29 | compositor.draw_page(context, page_nr) | ||
279 | 30 | |||
280 | 31 | def begin_print(operation, context, compositor): | ||
281 | 32 | n_pages = 1 | ||
282 | 33 | while not compositor.paginate(context): | ||
283 | 34 | pass | ||
284 | 35 | |||
285 | 36 | n_pages = compositor.get_n_pages() | ||
286 | 37 | operation.set_n_pages(n_pages) | ||
287 | 38 | |||
288 | 39 | def printall(act, location): | ||
289 | 40 | views = [view for view in act.vigtk.window.get_views()] | ||
290 | 41 | |||
291 | 42 | count = 1 | ||
292 | 43 | for view in views: | ||
293 | 44 | |||
294 | 45 | po = PrintOperation() | ||
295 | 46 | setup = PageSetup() | ||
296 | 47 | po.set_default_page_setup(setup) | ||
297 | 48 | |||
298 | 49 | po.set_export_filename("%s/%d.pdf" % (location, count)) | ||
299 | 50 | count += 1 | ||
300 | 51 | |||
301 | 52 | pc = gtksourceview2.print_compositor_new_from_view(view) | ||
302 | 53 | |||
303 | 54 | po.connect("begin_print", begin_print, pc) | ||
304 | 55 | po.connect("draw_page", draw_page, pc) | ||
305 | 56 | |||
306 | 57 | res = po.run(act.gtk.PRINT_OPERATION_ACTION_EXPORT) | ||
307 | 26 | 58 | ||
308 | === modified file 'src/ViGedit/actions/text.py' (properties changed: -x to +x) | |||
309 | --- src/ViGedit/actions/text.py 2009-07-08 05:08:29 +0000 | |||
310 | +++ src/ViGedit/actions/text.py 2010-02-05 03:26:13 +0000 | |||
311 | @@ -4,23 +4,31 @@ | |||
312 | 4 | ### | 4 | ### |
313 | 5 | ######################## | 5 | ######################## |
314 | 6 | 6 | ||
322 | 7 | def delete_PrevChar(act): | 7 | def delete_PrevChar(act, withBackSpace=False): |
323 | 8 | oldMode = act.bindings.mode | 8 | if withBackSpace: |
324 | 9 | act.bindings.mode = act.modes.visual | 9 | act.vibase.doc.backspace(act.pos.getIter(act), False, True) |
325 | 10 | act.pos.move_Backward(act, True) | 10 | else: |
326 | 11 | cut_Selection(act) | 11 | oldMode = act.bindings.mode |
327 | 12 | act.bindings.mode = oldMode | 12 | act.bindings.mode = act.modes.visual |
328 | 13 | #act.vibase.doc.backspace(act.pos.getIter(act), False, True) | 13 | act.pos.move_Backward(act, True) |
329 | 14 | cut_Selection(act) | ||
330 | 15 | act.bindings.mode = oldMode | ||
331 | 14 | 16 | ||
333 | 15 | def delete_Char(act): | 17 | def delete_Char(act, withBackSpace=False): |
334 | 16 | act.pos.move_Forward(act) | 18 | act.pos.move_Forward(act) |
336 | 17 | delete_PrevChar(act) | 19 | delete_PrevChar(act, withBackSpace) |
337 | 18 | 20 | ||
338 | 19 | def delete_WholeLines(act): | 21 | def delete_WholeLines(act): |
339 | 20 | number = act.vibase.numLines | 22 | number = act.vibase.numLines |
340 | 21 | act.lines.select_Lines(act, number) | 23 | act.lines.select_Lines(act, number) |
341 | 22 | cut_Selection(act) | 24 | cut_Selection(act) |
343 | 23 | act.text.delete_Char(act) | 25 | cursor = act.pos.getIter(act) |
344 | 26 | line = cursor.get_line() | ||
345 | 27 | if line > 0: | ||
346 | 28 | delete_PrevChar(act, withBackSpace=True) | ||
347 | 29 | act.pos.move_Forward(act) | ||
348 | 30 | else: | ||
349 | 31 | delete_Char(act, withBackSpace=True) | ||
350 | 24 | 32 | ||
351 | 25 | def delete_ToLineEnd(act): | 33 | def delete_ToLineEnd(act): |
352 | 26 | act.lines.select_ToLineEnd(act) | 34 | act.lines.select_ToLineEnd(act) |
353 | 27 | 35 | ||
354 | === modified file 'src/ViGedit/actions/trace.py' (properties changed: -x to +x) | |||
355 | --- src/ViGedit/actions/trace.py 2009-06-30 02:54:14 +0000 | |||
356 | +++ src/ViGedit/actions/trace.py 2010-02-05 03:26:13 +0000 | |||
357 | @@ -35,8 +35,8 @@ | |||
358 | 35 | 35 | ||
359 | 36 | def intro(mode=None, message=None, *args): | 36 | def intro(mode=None, message=None, *args): |
360 | 37 | if message: | 37 | if message: |
362 | 38 | info(1, message, *args, color=MAGNETA) | 38 | info(1, message, *args, **{'color' : MAGNETA}) |
363 | 39 | else: | 39 | else: |
365 | 40 | info(1, "Introducing %s mode", mode.mode, color=MAGNETA) | 40 | info(1, "Introducing %s mode", mode.mode, **{'color' : MAGNETA}) |
366 | 41 | 41 | ||
367 | 42 | 42 | ||
368 | 43 | 43 | ||
369 | === modified file 'src/ViGedit/bindings/__init__.py' (properties changed: -x to +x) | |||
370 | --- src/ViGedit/bindings/__init__.py 2009-06-30 02:54:14 +0000 | |||
371 | +++ src/ViGedit/bindings/__init__.py 2010-02-05 03:26:13 +0000 | |||
372 | @@ -31,7 +31,7 @@ | |||
373 | 31 | 31 | ||
374 | 32 | def register(self, mode, function, keycode, control=False, meta=False, | 32 | def register(self, mode, function, keycode, control=False, meta=False, |
375 | 33 | final=False, repeat=False, after=None, pos=False, | 33 | final=False, repeat=False, after=None, pos=False, |
377 | 34 | ignoreStack=False, stack = ""): | 34 | ignoreStack=False, stack = "", recordAction = True): |
378 | 35 | 35 | ||
379 | 36 | keycombo = keycode, control, meta, stack | 36 | keycombo = keycode, control, meta, stack |
380 | 37 | try: | 37 | try: |
381 | @@ -53,6 +53,7 @@ | |||
382 | 53 | 'PreservePos' : pos, | 53 | 'PreservePos' : pos, |
383 | 54 | 'IgnoreStack' : ignoreStack, | 54 | 'IgnoreStack' : ignoreStack, |
384 | 55 | 'StackMatch' : stack, | 55 | 'StackMatch' : stack, |
385 | 56 | 'RecordAction' : recordAction, | ||
386 | 56 | } | 57 | } |
387 | 57 | 58 | ||
388 | 58 | 59 | ||
389 | 59 | 60 | ||
390 | === modified file 'src/ViGedit/bindings/base.py' (properties changed: -x to +x) | |||
391 | --- src/ViGedit/bindings/base.py 2009-06-30 02:54:14 +0000 | |||
392 | +++ src/ViGedit/bindings/base.py 2010-02-05 03:26:13 +0000 | |||
393 | @@ -38,6 +38,10 @@ | |||
394 | 38 | """Called when no binding has been found and so the mode is left to handle the event""" | 38 | """Called when no binding has been found and so the mode is left to handle the event""" |
395 | 39 | return True | 39 | return True |
396 | 40 | 40 | ||
397 | 41 | def ignore(self, vibase, event): | ||
398 | 42 | """Returns True if this event should be ignored""" | ||
399 | 43 | return False | ||
400 | 44 | |||
401 | 41 | def nop(self, act): | 45 | def nop(self, act): |
402 | 42 | pass | 46 | pass |
403 | 43 | 47 | ||
404 | 44 | 48 | ||
405 | === modified file 'src/ViGedit/bindings/block.py' (properties changed: -x to +x) | |||
406 | === modified file 'src/ViGedit/bindings/capture.py' (properties changed: -x to +x) | |||
407 | --- src/ViGedit/bindings/capture.py 2009-06-30 02:54:14 +0000 | |||
408 | +++ src/ViGedit/bindings/capture.py 2010-02-05 03:26:13 +0000 | |||
409 | @@ -5,7 +5,8 @@ | |||
410 | 5 | def __init__(self, act, options=None): | 5 | def __init__(self, act, options=None): |
411 | 6 | self.captureNum = 0 | 6 | self.captureNum = 0 |
412 | 7 | self.capturedEvents = [] | 7 | self.capturedEvents = [] |
414 | 8 | self.startMode = act.modes.command | 8 | self.start = None |
415 | 9 | self.capture = None | ||
416 | 9 | 10 | ||
417 | 10 | class Mode(VIG_ModeBase): | 11 | class Mode(VIG_ModeBase): |
418 | 11 | 12 | ||
419 | @@ -16,7 +17,8 @@ | |||
420 | 16 | """ | 17 | """ |
421 | 17 | 18 | ||
422 | 18 | def setup(self, act): | 19 | def setup(self, act): |
424 | 19 | self.reg(self.captureNextEvents, act.gtk.keysyms.a, final=True, after=act.modes.command) | 20 | self.reg(self.captureNextEvents, act.gtk.keysyms.a, final=True) |
425 | 21 | self.reg(self.setCaptureMode, act.gtk.keysyms.d, final=True, after=act.modes.command) | ||
426 | 20 | self.reg(self.setStartMode, act.gtk.keysyms.s, final=True, after=act.modes.command) | 22 | self.reg(self.setStartMode, act.gtk.keysyms.s, final=True, after=act.modes.command) |
427 | 21 | self.reg(self.clearCapturedEvents, act.gtk.keysyms.c, final=True, after=act.modes.command) | 23 | self.reg(self.clearCapturedEvents, act.gtk.keysyms.c, final=True, after=act.modes.command) |
428 | 22 | self.reg(self.emitCapturedEvents, act.gtk.keysyms.e, final=True) | 24 | self.reg(self.emitCapturedEvents, act.gtk.keysyms.e, final=True) |
429 | @@ -50,12 +52,15 @@ | |||
430 | 50 | act.vibase.setExtraStatus(num, self.extraStatus) | 52 | act.vibase.setExtraStatus(num, self.extraStatus) |
431 | 51 | options.captureNum = num | 53 | options.captureNum = num |
432 | 52 | 54 | ||
433 | 55 | act.bindings.mode = act.modes.command | ||
434 | 56 | if options.capture: | ||
435 | 57 | options.captureNum += 1 | ||
436 | 58 | act.keyboard.emitEvent(act, options.capture) | ||
437 | 59 | |||
438 | 53 | def capture(act, event): | 60 | def capture(act, event): |
439 | 54 | options = act.vibase.captureOptions | 61 | options = act.vibase.captureOptions |
440 | 62 | |||
441 | 55 | if options.captureNum > 0: | 63 | if options.captureNum > 0: |
442 | 56 | if not options.startMode and len(options.capturedEvents) == 0: | ||
443 | 57 | options.startMode = act.bindings.mode | ||
444 | 58 | |||
445 | 59 | capturedEvent = act.keyboard.makeEvent(act, event.keyval, event.state) | 64 | capturedEvent = act.keyboard.makeEvent(act, event.keyval, event.state) |
446 | 60 | options.capturedEvents.append(capturedEvent) | 65 | options.capturedEvents.append(capturedEvent) |
447 | 61 | options.captureNum -= 1 | 66 | options.captureNum -= 1 |
448 | @@ -66,14 +71,28 @@ | |||
449 | 66 | ### GET START MODE | 71 | ### GET START MODE |
450 | 67 | ######################## | 72 | ######################## |
451 | 68 | 73 | ||
452 | 74 | def setFutureMode(self, act, when, message): | ||
453 | 75 | act.bindings.mode = act.modes.command | ||
454 | 76 | act.vibase.setExtraStatus(1, lambda act : " (%s)" % message) | ||
455 | 77 | |||
456 | 78 | def getEvent(act, event, when): | ||
457 | 79 | if type(when) is str: | ||
458 | 80 | when = (when, ) | ||
459 | 81 | |||
460 | 82 | for w in when: | ||
461 | 83 | setattr(act.vibase.captureOptions, w, act.keyboard.makeEvent(act, event.keyval, event.state)) | ||
462 | 84 | |||
463 | 85 | act.vibase.setRule(1, lambda a, e : getEvent(a, e, when)) | ||
464 | 86 | |||
465 | 69 | def setStartMode(self, act): | 87 | def setStartMode(self, act): |
471 | 70 | act.bindings.mode = act.modes.command | 88 | when = "start" |
472 | 71 | act.vibase.setExtraStatus(1, lambda : "(next key determines start mode when emmitting captured keys)") | 89 | if not act.vibase.captureOptions.capture: |
473 | 72 | 90 | when = [when, 'capture'] | |
469 | 73 | def getStartEvent(act, event): | ||
470 | 74 | act.vibase.captureOptions['start'] = act.keyboard.makeEvent(act, event.keyval, event.state) | ||
474 | 75 | 91 | ||
476 | 76 | act.vibase.setRule(1, getStartEvent) | 92 | self.setFutureMode(act, when, "next key determines start mode when emitting captured keys") |
477 | 93 | |||
478 | 94 | def setCaptureMode(self, act): | ||
479 | 95 | self.setFutureMode(act, 'capture', "Next key determines mode for capturing keys") | ||
480 | 77 | 96 | ||
481 | 78 | ######################## | 97 | ######################## |
482 | 79 | ### EMIT | 98 | ### EMIT |
483 | @@ -81,7 +100,10 @@ | |||
484 | 81 | 100 | ||
485 | 82 | def emitCapturedEvents(self, act): | 101 | def emitCapturedEvents(self, act): |
486 | 83 | options = act.vibase.captureOptions | 102 | options = act.vibase.captureOptions |
488 | 84 | act.bindings.mode = options.startMode | 103 | act.bindings.mode = act.modes.command |
489 | 104 | if options.start: | ||
490 | 105 | act.keyboard.emitEvent(act, options.start) | ||
491 | 106 | |||
492 | 85 | message = "captured keys : [" | 107 | message = "captured keys : [" |
493 | 86 | for event in options.capturedEvents: | 108 | for event in options.capturedEvents: |
494 | 87 | act.keyboard.emitEvent(act, event) | 109 | act.keyboard.emitEvent(act, event) |
495 | @@ -96,5 +118,7 @@ | |||
496 | 96 | def clearCapturedEvents(self, act): | 118 | def clearCapturedEvents(self, act): |
497 | 97 | options = act.vibase.captureOptions | 119 | options = act.vibase.captureOptions |
498 | 98 | options.capturedEvents = [] | 120 | options.capturedEvents = [] |
500 | 99 | optionscaptureNum = 0 | 121 | options.captureNum = 0 |
501 | 122 | options.start = None | ||
502 | 123 | options.capture = None | ||
503 | 100 | 124 | ||
504 | 101 | 125 | ||
505 | === modified file 'src/ViGedit/bindings/change.py' (properties changed: -x to +x) | |||
506 | === modified file 'src/ViGedit/bindings/command.py' (properties changed: -x to +x) | |||
507 | --- src/ViGedit/bindings/command.py 2009-07-08 05:08:29 +0000 | |||
508 | +++ src/ViGedit/bindings/command.py 2010-02-05 03:26:13 +0000 | |||
509 | @@ -22,25 +22,27 @@ | |||
510 | 22 | self.reg(act.text.paste_ClipboardAbove, act.gtk.keysyms.P, after=act.modes.command, pos=True, **self.fr) | 22 | self.reg(act.text.paste_ClipboardAbove, act.gtk.keysyms.P, after=act.modes.command, pos=True, **self.fr) |
511 | 23 | self.reg(act.text.paste_ClipboardBelow, act.gtk.keysyms.p, after=act.modes.command, pos=True, **self.fr) | 23 | self.reg(act.text.paste_ClipboardBelow, act.gtk.keysyms.p, after=act.modes.command, pos=True, **self.fr) |
512 | 24 | 24 | ||
520 | 25 | self.reg(act.others.redo, act.gtk.keysyms.r, True, **self.fr) | 25 | self.reg(act.others.redoLastOperation, act.gtk.keysyms.period, recordAction=False, **self.fr) |
521 | 26 | self.reg(act.others.undo, act.gtk.keysyms.u, **self.fr) | 26 | self.reg(act.others.redo, act.gtk.keysyms.r, True,recordAction=False, **self.fr) |
522 | 27 | self.reg(act.text.delete_Char, act.gtk.keysyms.x, **self.fr) | 27 | self.reg(act.others.undo, act.gtk.keysyms.u, recordAction=False, **self.fr) |
523 | 28 | self.reg(act.others.nextSearchItem, act.gtk.keysyms.n, **self.fr) | 28 | self.reg(act.text.delete_Char, act.gtk.keysyms.x, **self.fr) |
524 | 29 | self.reg(act.text.delete_PrevChar, act.gtk.keysyms.X, **self.fr) | 29 | self.reg(act.getMenu('searchNext'), act.gtk.keysyms.n, **self.fr) |
525 | 30 | self.reg(act.text.delete_Char, act.gtk.keysyms.Delete, **self.fr) | 30 | self.reg(act.getMenu('searchPrev'), act.gtk.keysyms.N, **self.fr) |
526 | 31 | self.reg(act.text.switchChar, act.gtk.keysyms.S, **self.fr) | 31 | self.reg(act.text.delete_PrevChar, act.gtk.keysyms.X, **self.fr) |
527 | 32 | self.reg(act.text.delete_Char, act.gtk.keysyms.Delete, **self.fr) | ||
528 | 33 | self.reg(act.text.switchChar, act.gtk.keysyms.S, **self.fr) | ||
529 | 32 | 34 | ||
541 | 33 | self.reg(act.pos.move_Forward, act.gtk.keysyms.l, **self.fr) | 35 | self.reg(act.pos.move_Forward, act.gtk.keysyms.l, **self.fr) |
542 | 34 | self.reg(act.pos.move_Backward, act.gtk.keysyms.h, **self.fr) | 36 | self.reg(act.pos.move_Backward, act.gtk.keysyms.h, **self.fr) |
543 | 35 | self.reg(act.pos.move_Down, act.gtk.keysyms.j, **self.fr) | 37 | self.reg(act.pos.move_Down, act.gtk.keysyms.j, **self.fr) |
544 | 36 | self.reg(act.pos.move_Up, act.gtk.keysyms.k, **self.fr) | 38 | self.reg(act.pos.move_Up, act.gtk.keysyms.k, **self.fr) |
545 | 37 | self.reg(act.pos.move_WordForward, act.gtk.keysyms.w, **self.fr) | 39 | self.reg(act.pos.move_WordForward, act.gtk.keysyms.w, **self.fr) |
546 | 38 | self.reg(act.pos.move_WordBackward, act.gtk.keysyms.b, **self.fr) | 40 | self.reg(act.pos.move_WordBackward, act.gtk.keysyms.b, **self.fr) |
547 | 39 | self.reg(act.pos.move_BufferEnd, act.gtk.keysyms.G, **self.fr) | 41 | self.reg(act.pos.move_BufferEnd, act.gtk.keysyms.G, **self.fr) |
548 | 40 | self.reg(act.pos.move_LineBegin, act.gtk.keysyms._0, **self.fr) | 42 | self.reg(act.pos.move_LineBegin, act.gtk.keysyms._0, **self.fr) |
549 | 41 | self.reg(act.pos.move_LineEnd, act.gtk.keysyms.dollar, **self.fr) | 43 | self.reg(act.pos.move_LineEnd, act.gtk.keysyms.dollar, **self.fr) |
550 | 42 | self.reg(act.pos.move_LineBegin, act.gtk.keysyms.asciicircum, **self.fr) | 44 | self.reg(act.pos.move_LineBegin, act.gtk.keysyms.asciicircum, **self.fr) |
551 | 43 | self.reg(act.pos.toEmptyLine, act.gtk.keysyms.E, **self.fr) | 45 | self.reg(act.pos.toEmptyLine, act.gtk.keysyms.E, **self.fr) |
552 | 44 | 46 | ||
553 | 45 | self.reg(act.pos.move_LineEnd, act.gtk.keysyms.A, after=act.modes.insert, **self.fr) | 47 | self.reg(act.pos.move_LineEnd, act.gtk.keysyms.A, after=act.modes.insert, **self.fr) |
554 | 46 | self.reg(act.pos.move_LineBegin, act.gtk.keysyms.I, after=act.modes.insert, **self.fr) | 48 | self.reg(act.pos.move_LineBegin, act.gtk.keysyms.I, after=act.modes.insert, **self.fr) |
555 | @@ -63,5 +65,12 @@ | |||
556 | 63 | (so you can still use ordinary shortcuts in command mode""" | 65 | (so you can still use ordinary shortcuts in command mode""" |
557 | 64 | return not act.keyboard.isModifierPressed(act, event) | 66 | return not act.keyboard.isModifierPressed(act, event) |
558 | 65 | 67 | ||
559 | 68 | def ignore(self, vibase, event): | ||
560 | 69 | if event.keyval == ord('0'): | ||
561 | 70 | if int(''.join(vibase.number)) > 0: | ||
562 | 71 | return True | ||
563 | 72 | |||
564 | 73 | return False | ||
565 | 74 | |||
566 | 66 | 75 | ||
567 | 67 | 76 | ||
568 | 68 | 77 | ||
569 | === modified file 'src/ViGedit/bindings/delete.py' (properties changed: -x to +x) | |||
570 | === modified file 'src/ViGedit/bindings/ex.py' (properties changed: -x to +x) | |||
571 | === modified file 'src/ViGedit/bindings/g.py' (properties changed: -x to +x) | |||
572 | === modified file 'src/ViGedit/bindings/indent.py' (properties changed: -x to +x) | |||
573 | === modified file 'src/ViGedit/bindings/insert.py' (properties changed: -x to +x) | |||
574 | === modified file 'src/ViGedit/bindings/replace.py' (properties changed: -x to +x) | |||
575 | === modified file 'src/ViGedit/bindings/selection.py' (properties changed: -x to +x) | |||
576 | === modified file 'src/ViGedit/bindings/t.py' (properties changed: -x to +x) | |||
577 | === modified file 'src/ViGedit/bindings/visual.py' (properties changed: -x to +x) | |||
578 | --- src/ViGedit/bindings/visual.py 2009-06-30 02:54:14 +0000 | |||
579 | +++ src/ViGedit/bindings/visual.py 2010-02-05 03:26:13 +0000 | |||
580 | @@ -27,7 +27,9 @@ | |||
581 | 27 | 27 | ||
582 | 28 | self.reg(act.others.undo, act.gtk.keysyms.u, **self.fr) | 28 | self.reg(act.others.undo, act.gtk.keysyms.u, **self.fr) |
583 | 29 | self.reg(act.others.search, act.gtk.keysyms.slash, final=True) | 29 | self.reg(act.others.search, act.gtk.keysyms.slash, final=True) |
585 | 30 | 30 | ||
586 | 31 | self.reg(act.lines.select_OneLine, act.gtk.keysyms.V, after=act.modes.visual, final=True) | ||
587 | 32 | |||
588 | 31 | self.reg(act.pos.move_LineEnd, act.gtk.keysyms.A, after=act.modes.insert, **self.fr) | 33 | self.reg(act.pos.move_LineEnd, act.gtk.keysyms.A, after=act.modes.insert, **self.fr) |
589 | 32 | self.reg(act.pos.move_LineBegin, act.gtk.keysyms.I, after=act.modes.insert, **self.fr) | 34 | self.reg(act.pos.move_LineBegin, act.gtk.keysyms.I, after=act.modes.insert, **self.fr) |
590 | 33 | self.reg(act.insert.open_LineBelow, act.gtk.keysyms.o, after=act.modes.visual, **self.fr) | 35 | self.reg(act.insert.open_LineBelow, act.gtk.keysyms.o, after=act.modes.visual, **self.fr) |
591 | 34 | 36 | ||
592 | === modified file 'src/ViGedit/bindings/yank.py' (properties changed: -x to +x) | |||
593 | === modified file 'src/ViGedit/cursor.py' (properties changed: -x to +x) | |||
594 | === modified file 'src/ViGedit/keyboard.py' (properties changed: -x to +x) | |||
595 | === modified file 'src/ViGedit/options.py' (properties changed: -x to +x) | |||
596 | === modified file 'src/ViGedit/static.py' (properties changed: -x to +x) | |||
597 | --- src/ViGedit/static.py 2009-06-30 02:54:14 +0000 | |||
598 | +++ src/ViGedit/static.py 2010-02-05 03:26:13 +0000 | |||
599 | @@ -27,7 +27,7 @@ | |||
600 | 27 | ### MODES | 27 | ### MODES |
601 | 28 | ### | 28 | ### |
602 | 29 | ######################## | 29 | ######################## |
604 | 30 | 30 | ||
605 | 31 | class VIG_Modes(object): | 31 | class VIG_Modes(object): |
606 | 32 | """Holds info on all the modes""" | 32 | """Holds info on all the modes""" |
607 | 33 | 33 | ||
608 | 34 | 34 | ||
609 | === modified file 'src/ViGedit/vi.py' (properties changed: -x to +x) | |||
610 | --- src/ViGedit/vi.py 2009-06-30 02:54:14 +0000 | |||
611 | +++ src/ViGedit/vi.py 2010-02-05 03:26:13 +0000 | |||
612 | @@ -54,6 +54,7 @@ | |||
613 | 54 | self.returnToMode = None | 54 | self.returnToMode = None |
614 | 55 | self.extraMessage = None | 55 | self.extraMessage = None |
615 | 56 | self.select = False | 56 | self.select = False |
616 | 57 | self.lastOperation = None | ||
617 | 57 | 58 | ||
618 | 58 | self.viewEvents = [ | 59 | self.viewEvents = [ |
619 | 59 | self.view.connect("key-press-event", self.onKeyPress), | 60 | self.view.connect("key-press-event", self.onKeyPress), |
620 | @@ -137,7 +138,7 @@ | |||
621 | 137 | if callable(rule): | 138 | if callable(rule): |
622 | 138 | rule(self.act, event) | 139 | rule(self.act, event) |
623 | 139 | if life == 0: | 140 | if life == 0: |
625 | 140 | self.rules.remove(1, rule) | 141 | self.rules.remove((1, rule)) |
626 | 141 | 142 | ||
627 | 142 | # Always return to command mode when Escape is pressed. | 143 | # Always return to command mode when Escape is pressed. |
628 | 143 | if (event.keyval == gtk.keysyms.Escape): | 144 | if (event.keyval == gtk.keysyms.Escape): |
629 | @@ -215,11 +216,12 @@ | |||
630 | 215 | control, meta = self.keyboard.modifiers(self.act, event) | 216 | control, meta = self.keyboard.modifiers(self.act, event) |
631 | 216 | self.act.trace.info(1, "\t%s %s %s %s", currentMode, event.keyval, control, meta) | 217 | self.act.trace.info(1, "\t%s %s %s %s", currentMode, event.keyval, control, meta) |
632 | 217 | 218 | ||
635 | 218 | #determine if there is a binding, and put it into bindingInfo | 219 | bindingInfo = None |
634 | 219 | |||
636 | 220 | doPropogate = currentMode != static.modes.insert | 220 | doPropogate = currentMode != static.modes.insert |
637 | 221 | keycombo = [currentMode, event.keyval, control, meta, "".join(self.stack)] | 221 | keycombo = [currentMode, event.keyval, control, meta, "".join(self.stack)] |
639 | 222 | bindingInfo = self.vigtk.registry[(_ for _ in keycombo)] | 222 | #determine if there is a binding, and put it into bindingInfo |
640 | 223 | if not self.bindings.vigm[currentMode].ignore(self, event): | ||
641 | 224 | bindingInfo = self.vigtk.registry[(_ for _ in keycombo)] | ||
642 | 223 | 225 | ||
643 | 224 | #if no binding, remove stack from keycombo and try again | 226 | #if no binding, remove stack from keycombo and try again |
644 | 225 | if not bindingInfo: | 227 | if not bindingInfo: |
645 | @@ -253,36 +255,52 @@ | |||
646 | 253 | isRepeatable = bindingInfo["Repeatable"] | 255 | isRepeatable = bindingInfo["Repeatable"] |
647 | 254 | afterMode = bindingInfo["AfterMode"] | 256 | afterMode = bindingInfo["AfterMode"] |
648 | 255 | preservePos = bindingInfo["PreservePos"] | 257 | preservePos = bindingInfo["PreservePos"] |
649 | 258 | recordAction = bindingInfo["RecordAction"] | ||
650 | 256 | pos = None | 259 | pos = None |
651 | 257 | 260 | ||
652 | 258 | if callable(function): | 261 | if callable(function): |
675 | 259 | args = [self.act] | 262 | def operation(act, preservePos, isRepeatable, isFinal, number, numLines, stack): |
676 | 260 | 263 | args = [act] | |
677 | 261 | if preservePos: | 264 | self.stack = stack |
678 | 262 | pos = self.cursor.getIter(self.act) | 265 | self.numLines = numLines |
679 | 263 | 266 | ||
680 | 264 | self.act.trace.info(2, "\tfunction is callable") | 267 | if preservePos: |
681 | 265 | if isRepeatable: | 268 | pos = self.cursor.getIter(self.act) |
682 | 266 | self.act.trace.info(2, "\tfunction is repeatable") | 269 | |
683 | 267 | [function(*args) for _ in range(int("".join(self.number or ["1"])) or 1)] | 270 | act.trace.info(2, "\tfunction is callable") |
684 | 268 | 271 | if isRepeatable: | |
685 | 269 | self.act.trace.info(2, "\tresetting numbers") | 272 | act.trace.info(2, "\tfunction is repeatable") |
686 | 270 | self.number = ['0'] | 273 | [function(*args) for _ in range(int("".join(number or ["1"])) or 1)] |
687 | 271 | self.numLines = 0 | 274 | |
688 | 272 | self.stack = [] | 275 | act.trace.info(2, "\tresetting numbers") |
689 | 273 | 276 | self.number = ['0'] | |
668 | 274 | else: | ||
669 | 275 | function(*args) | ||
670 | 276 | self.numLines = int("".join(self.number or ["1"])) | ||
671 | 277 | self.number = [] | ||
672 | 278 | |||
673 | 279 | if isFinal: | ||
674 | 280 | self.act.trace.info(2, "\tfunction is final") | ||
690 | 281 | self.numLines = 0 | 277 | self.numLines = 0 |
691 | 282 | self.stack = [] | 278 | self.stack = [] |
695 | 283 | 279 | ||
696 | 284 | if preservePos: | 280 | else: |
697 | 285 | self.cursor.moveInsert(self.act, pos) | 281 | function(*args) |
698 | 282 | self.numLines = int("".join(self.number or ["1"])) | ||
699 | 283 | self.number = [] | ||
700 | 284 | |||
701 | 285 | if isFinal: | ||
702 | 286 | self.act.trace.info(2, "\tfunction is final") | ||
703 | 287 | self.numLines = 0 | ||
704 | 288 | self.stack = [] | ||
705 | 289 | |||
706 | 290 | if preservePos: | ||
707 | 291 | self.cursor.moveInsert(self.act, pos) | ||
708 | 292 | |||
709 | 293 | number = list(self.number) | ||
710 | 294 | numLines = self.numLines | ||
711 | 295 | |||
712 | 296 | op = lambda act : operation(act, preservePos, isRepeatable, isFinal, number, numLines, self.stack) | ||
713 | 297 | |||
714 | 298 | if recordAction: | ||
715 | 299 | #store lastOperation so keybindings can call it again if need be (i.e. . option in command mode) | ||
716 | 300 | self.lastOperation = op | ||
717 | 301 | |||
718 | 302 | #call that operation | ||
719 | 303 | op(self.act) | ||
720 | 286 | 304 | ||
721 | 287 | else: | 305 | else: |
722 | 288 | self.act.trace.info(2, "\tfunction is not callable") | 306 | self.act.trace.info(2, "\tfunction is not callable") |
723 | 289 | 307 | ||
724 | === modified file 'src/ViGedit/vigtk.py' (properties changed: -x to +x) | |||
725 | --- src/ViGedit/vigtk.py 2009-06-30 02:54:14 +0000 | |||
726 | +++ src/ViGedit/vigtk.py 2010-02-05 03:26:13 +0000 | |||
727 | @@ -61,6 +61,7 @@ | |||
728 | 61 | self.menu_save = self.ui_manager.get_action("/MenuBar/FileMenu/FileSaveMenu") | 61 | self.menu_save = self.ui_manager.get_action("/MenuBar/FileMenu/FileSaveMenu") |
729 | 62 | self.menu_saveAs = self.ui_manager.get_action("/MenuBar/FileMenu/FileSaveAsMenu") | 62 | self.menu_saveAs = self.ui_manager.get_action("/MenuBar/FileMenu/FileSaveAsMenu") |
730 | 63 | self.menu_searchNext = self.ui_manager.get_action("/MenuBar/SearchMenu/SearchFindNextMenu") | 63 | self.menu_searchNext = self.ui_manager.get_action("/MenuBar/SearchMenu/SearchFindNextMenu") |
731 | 64 | self.menu_searchPrev = self.ui_manager.get_action("/MenuBar/SearchMenu/SearchFindPreviousMenu") | ||
732 | 64 | self.menu_quit = self.ui_manager.get_action("/MenuBar/FileMenu/FileQuitMenu") | 65 | self.menu_quit = self.ui_manager.get_action("/MenuBar/FileMenu/FileQuitMenu") |
733 | 65 | self.menu_fileClose = self.ui_manager.get_action("/MenuBar/FileMenu/FileCloseMenu") | 66 | self.menu_fileClose = self.ui_manager.get_action("/MenuBar/FileMenu/FileCloseMenu") |
734 | 66 | self.menu_indentRight = self.ui_manager.get_action("/MenuBar/EditMenu/EditOps_5/Indent") | 67 | self.menu_indentRight = self.ui_manager.get_action("/MenuBar/EditMenu/EditOps_5/Indent") |
735 | 67 | 68 | ||
736 | === modified file 'src/autotab/ChangeLog (Case Conflict 1)' (properties changed: -x to +x) | |||
737 | === modified file 'src/autotab/README' (properties changed: -x to +x) | |||
738 | === modified file 'src/autotab/autotab.py' (properties changed: -x to +x) |
This branch has great commits and I can't see any problems in it. Please merge it to the trunk.