#596 Lua OnClose event confuses files closed with "Close All"

SciTE (625)

When multiple files are closed with "Close All", the Lua OnClose event fires for each file closed, but gives the file path for whichever buffer was selected when "Close All" was used.

The value for editor.Length is correctly updated for each file, but the file path argument, props["FilePath"], and anything stored in the buffer table are not.

I'm using SciTE 1.74, on Windows XP.


  • Neil Hodgson

    Neil Hodgson - 2007-09-04

    Logged In: YES
    Originator: NO

    Its unlikely I'll work on this myself.

  • Neil Hodgson

    Neil Hodgson - 2007-09-04
    • priority: 5 --> 3
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-accepted
  • Johannes Sasongko

    Tested with this:

    function OnClose(filename)
        f = io.open("/foo/out.txt", "a")
        f:write(filename .. "\n")

    and then closing a SciTE window that has multiple tabs open (not sure if this is the "Close All" referred to in the report), and all the filenames show up correctly, no duplicates.

    (Except for Untitled tabs, which are all shown as the current working directory including slash, e.g. /foo/, or empty if the current working directory is /)

  • Neil Hodgson

    Neil Hodgson - 2016-03-15
    • status: open-accepted --> open-fixed
  • Neil Hodgson

    Neil Hodgson - 2016-03-15

    Path argument fixed by [997d04].

    props["FilePath"] and similar are not updated for each call. It would be possible to set more of the props for each call but that would have a performance cost. The path that sets up props["FIlePath"] also re-reads settings and does other chores that are needed when its likely the user will see that document which isn't the case for Close All.



    Commit: [997d04]

  • Neil Hodgson

    Neil Hodgson - 2016-03-16
    • status: open-fixed --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks