Preserve file/line information with saved ex commands (:au, :com, :map -ex).

This commit is contained in:
Kris Maglione committed 2010-10-05 15:29:18 -04:00
1 parent 2ee74581d1
commit 7f574a512f
8 files changed
+126 -119

No files matched your search

+10
View File
@@ -764,6 +764,16 @@ Class.prototype = {
*/
init: function () {},
withSavedValues: function (names, callback, self) {
let vals = names.map(function (name) this[name], this);
try {
return callback.call(self || this);
}
finally {
names.forEach(function (name, i) this[name] = vals[i], this);
}
},
toString: function () "[instance " + this.constructor.className + "]",
/**