[gedit-plugins] Implement immediate single column mode
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] Implement immediate single column mode
- Date: Sat, 1 May 2010 10:55:11 +0000 (UTC)
commit 631a9b26caf4056d9977d1bf636af87bad585242
Author: Jesse van den Kieboom <jesse icecrew nl>
Date: Sat May 1 12:54:38 2010 +0200
Implement immediate single column mode
plugins/multiedit/multiedit/documenthelper.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/multiedit/multiedit/documenthelper.py b/plugins/multiedit/multiedit/documenthelper.py
index 07d0578..df88b1a 100644
--- a/plugins/multiedit/multiedit/documenthelper.py
+++ b/plugins/multiedit/multiedit/documenthelper.py
@@ -402,9 +402,13 @@ class DocumentHelper(Signals):
start_line = start.get_line()
end_line = end.get_line()
+ singlecolumn = soff == eoff
+
while start.get_line() <= end.get_line():
self.line_column_edit(start, soff, eoff)
+ singlecolumn = (singlecolumn and self.get_visible_iter(start.get_line(), soff)[1] == 0)
+
if not start.forward_line():
break
@@ -419,6 +423,10 @@ class DocumentHelper(Signals):
self._column_mode = (start_line, end_line, soff, eoff)
self.status('<i>%s</i>' % (xml.sax.saxutils.escape(_('Column Mode...')),))
+ if singlecolumn:
+ self._apply_column_mode()
+ self._multi_edited = True
+
return True
def _draw_column_mode(self, event):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]