File: 06_fix-vim-modeline

package info (click to toggle)
ldapvi 1.7-11.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,204 kB
  • sloc: ansic: 6,536; xml: 1,331; sh: 194; makefile: 16
file content (18 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: use fileencoding in vim modeline instead of encoding
  The encoding setting is not allowed in modeline in recent vim versions,
  so switch to fileencoding instead.
Origin: http://lists.askja.de/pipermail/ldapvi/2011-January/000088.html
Bug-Debian: http://bugs.debian.org/688129, http://bugs.debian.org/663121
Author: Devin J. Pohly <djpohly@gmail.com>

--- a/ldapvi.c
+++ b/ldapvi.c
@@ -1414,7 +1414,7 @@
 	int nlines = 0;
 
 	if (print_binary_mode == PRINT_UTF8 && !cmdline->ldif) {
-		fputs("# -*- coding: utf-8 -*- vim:encoding=utf-8:\n", s);
+		fputs("# -*- coding: utf-8 -*- vim:fileencoding=utf-8:\n", s);
 		nlines++;
 	}
 	if (cmdline->ldif) {