[gedit] Support not only 'textwidth' vim keyword but 'tw' as its synonym as well.



commit 6a5f3bb78045be059f7e155943f6c476a1300356
Author: MatÄj Cepl <mcepl redhat com>
Date:   Thu Sep 8 11:56:58 2011 +0200

    Support not only 'textwidth' vim keyword but 'tw' as its synonym as well.
    
    'tw' is quite a common abbreviation of textwidth, in my experience much
    more common actually than 'textwidth'.

 plugins/modelines/modeline-parser.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/modelines/modeline-parser.c b/plugins/modelines/modeline-parser.c
index a7896ec..a4d15a8 100644
--- a/plugins/modelines/modeline-parser.c
+++ b/plugins/modelines/modeline-parser.c
@@ -329,7 +329,8 @@ parse_vim_modeline (gchar           *s,
 
 			options->set |= MODELINE_SET_WRAP_MODE;
 		}
-		else if (strcmp (key->str, "textwidth") == 0)
+		else if (strcmp (key->str, "textwidth") == 0 ||
+		         strcmp (key->str, "tw") == 0)
 		{
 			intval = atoi (value->str);
 			



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]