update file type on save/save as
@@ -848,6 +848,9 @@ class Actions(app.mutator.Mutator):
inputFile.close()
else:
self.data = unicode("")
+ self.determineFileExtension()
+
+ def determineFileExtension(self):
self.fileExtension = os.path.splitext(self.fullPath)[1]
if self.fileExtension == "" and len(self.lines) > 0:
line = self.lines[0]
@@ -1073,6 +1076,8 @@ class Actions(app.mutator.Mutator):
app.log.exception(e)
except Exception:
app.log.info('except had exception')
+ self.upperChangedRow = 0
+ self.determineFileExtension()
def selectText(self, row, col, length, mode):
row = max(0, min(row, len(self.lines) - 1))
