more detail on my bug find

  • nute

    nute - 2004-07-15

    First of all, this Notepad rocks! makes me want to get into coding some more!

    ok heres what I found in the source pretaining to my minor annoyance : I have obtained the src, I found in
    Notepad_plus.cpp,  Line 1676
        const int NB_VIEW = 2;
        ScintillaEditView * pScintillaArray[NB_VIEW];
        DocTabView * pDocTabArray[NB_VIEW];

        // the oder (1.current view 2.non current view) is important
        // to synchronize with "hideCurrentView" function
        pScintillaArray[0] = _pEditView;
        pScintillaArray[1] = getNonCurrentEditView();

        pDocTabArray[0] = _pDocTab;
        pDocTabArray[1] = getNonCurrentDocTab();

        for (int j = 0 ; j < NB_VIEW ; j++)
            for (int i = (pScintillaArray[j]->getNbDoc()-1) ; i >= 0  ; i--)
                Buffer & docBuf = pScintillaArray[j]->getBufferAt(i);
                docFileStaus fStatus = docBuf.checkFileState();

                if (fStatus == MODIFIED_FROM_OUTSIDE)
                    if (doReloadOrNot(docBuf.getFileName()) == IDYES)
                else if (fStatus == FILE_DELETED)
                    if (doCloseOrNot(docBuf.getFileName()) == IDNO)
                        if ((pScintillaArray[j]->getNbDoc() == 1) && (_mainWindowStatus & TWO_VIEWS_MASK))
                bool isReadOnly = pScintillaArray[j]->isCurrentBufReadOnly();
                pScintillaArray[j]->execute(SCI_SETREADONLY, isReadOnly);

    I can read a bit of this code, it seems that the bug would be in WinXP ,failing to bring the application forward, even though the dialog popup was answered.
    Maybe a solution would be to allow the focus of NPP when that dialog is answered, like when that particular ELSE is reached.  If I am not knowing what I talk about, let me know here, Im not anything near expert of C code

    • Don HO

      Don HO - 2004-07-17

      Hi nute,

      > it seems that the bug would be in WinXP ,
      > failing to bring the application forward,
      > even though the dialog popup was answered.

      I don't know if it's the bug of XP, I didn't try it out on the other os. But you're in the right path (the right function anyway).
      Indeed, I should test if NPP is minimized in this fuction. If so, I bring up NPP to the top.

      The correction will be in the next release.



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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks