Update Ring Notepad - rnotefilestabs.ring - CloseFileTabByIndex() function
@@ -22,7 +22,7 @@ class RNoteFilesTabs
nIndex = filestabs.currentindex() + 1
cFile = aFilesLines[nIndex][1]
nRow = aFilesLines[nIndex][2]
- if not fexists(cFile) return ok
+ if not fexists(cFile) CloseFileTabByIndex(nIndex) return ok
cActiveFileName = cFile
openFile(cFile)
GotoLine(nRow)
@@ -34,6 +34,10 @@ class RNoteFilesTabs
func CloseFileTab
filestabs.blocksignals(True)
nIndex = filestabs.geteventparameters()[1]
+ CloseFileTabByIndex(nIndex)
+ filestabs.blocksignals(False)
+
+ func CloseFileTabByIndex nIndex
if filestabs.count() != 1
filestabs.removetab(nIndex)
del(aFilesLines,nIndex+1)
@@ -53,4 +57,3 @@ class RNoteFilesTabs
textedit1.setPlaintext("")
textedit1.blocksignals(False)
ok
- filestabs.blocksignals(False)
