[gedit] Support not only 'textwidth' vim keyword but 'tw' as its synonym as well.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Support not only 'textwidth' vim keyword but 'tw' as its synonym as well.
- Date: Thu, 8 Sep 2011 10:21:50 +0000 (UTC)
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]