Menu

#2260 In Editor.cxx, Message::GetLastChild is broken for lParam=-1

Bug
closed-fixed
scintilla (590)
5
2021-06-24
2021-06-03
Zufu Liu
No

The patch treats lParam <= 0 as no fold level set.

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2021-06-04
    • labels: --> scintilla
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2021-06-04

    There was a warning from gcc 9.2.0:

    ../src/Editor.h: In member function 'virtual Scintilla::sptr_t Scintilla::Internal::Editor::WndProc(Scintilla::Message, Scintilla::uptr_t, Scintilla::sptr_t)':
    ../src/Editor.h:631:11: warning: '<anonymous>' may be used uninitialized in this function [-Wmaybe-uninitialized]
      631 |   return {};
          |           ^
    

    Its OK with return std::nullopt;

    Committed as [dc965e] and [b7708a].

     

    Related

    Commit: [b7708a]
    Commit: [dc965e]

  • Zufu Liu

    Zufu Liu - 2021-06-04

    Updated patch to fix Document::GetLastChild().
    value_or() is removed as it does do lazy evaluation.

     
    • Neil Hodgson

      Neil Hodgson - 2021-06-04

      Committed GetLastChild as [9a4542].

      Did OptionalColour show a warning? The warning from gcc in OptionalFoldLevel looks like a bug to me, possibly caused by incorrect inline handling or it being constexpr. std::nullopt is uglier and overly specific - {} is the generic empty thing.

       

      Related

      Commit: [9a4542]

  • Neil Hodgson

    Neil Hodgson - 2021-06-24
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.