Skip to content

Commit 061b1dc

Browse files
committed
open the exrc tmp file with ignore errors
When trying to store and restore the keymapping, the encoding might differ, initially we found that most of the time the mkexrc command would store in cp1250 encoding. It seems that depending on the vimrc that command uses another encoding. Now we just open de tmpfile and ignore encoding errors. fixes #330 Signed-off-by: BlackEagle <[email protected]>
1 parent 076121c commit 061b1dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonx/vdebug/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _store_old_map(self):
157157
keys = {v for k, v in self.keymaps.items() if k not in self.exclude}
158158
special = {"<buffer>", "<silent>", "<special>", "<script>", "<expr>",
159159
"<unique>"}
160-
for line in codecs.open(tempfile, 'r', 'cp1250'):
160+
for line in codecs.open(tempfile, 'r', errors='ignore'):
161161
log.Log("keymapper: line '%s'" % line, log.Logger.DEBUG)
162162
line = line.encode('utf-8').decode('utf-8')
163163
if not regex.match(line):

0 commit comments

Comments
 (0)