Menu

#1369 Treat U+007F DELETE same as other C0 control characters

Committed
closed
scintilla (294)
5
2020-07-22
2020-07-08
Zufu Liu
No

Currently U+007F DELETE is not treated as control characters in Editor::SetRepresentations() and EditView::DrawCarets().
In EditView::DrawCarets() it cause block caret not shown.

The iscntrl() function in ScintillaWin/WM_CHAR can be replaced with IsControlCharacter() (for C0 only).

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2020-07-09

    Fusing the two calls into a template appears less type-safe to me as it leads to the need to type cast the argument in EditView. The natural home for IsControlCharacter would be in CharacterSet.h where there are similar functions like IsLowerCase that take int arguments.

    Is there any way to generate a DELETE for WM_CHAR? I tried disabling the key bindings for the VK_DELETE but it appears to never go to WM_CHAR.

     

    Last edit: Neil Hodgson 2020-07-09
  • Zufu Liu

    Zufu Liu - 2020-07-10

    It seems only Backspace (wParam=8) and Enter (wParam=13) goes into WM_CHAR with lastKeyDownConsumed=true.

     
  • Zufu Liu

    Zufu Liu - 2020-07-10

    Removed the limitation in WM_CHAR, IsControlCharacter() is moved into anonymous namespace.

     
  • Neil Hodgson

    Neil Hodgson - 2020-07-11
    • labels: --> scintilla
    • Group: Initial --> Committed
     
  • Neil Hodgson

    Neil Hodgson - 2020-07-11

    Committed representation with [b0355e].
    Changed IsControlCharacter with [16e865] but retained int argument as that is the convention defined by ctype.h for char classification functions.

    Did not change WM_CHAR as the lifetime of values assigned to lastKeyDownConsumed is unbounded and WM_CHAR may be used by snippet or macro programs or features.

     

    Related

    Commit: [16e865]
    Commit: [b0355e]

  • Neil Hodgson

    Neil Hodgson - 2020-07-14
    • summary: Teat U+007F DELETE same as other C0 control characters --> Treat U+007F DELETE same as other C0 control characters
     
  • Neil Hodgson

    Neil Hodgson - 2020-07-14

    Committed representation with [b0355e].
    Changed IsControlCharacter with [16e865] but retained int argument as that is the convention defined by ctype.h for char classification functions.

    Did not change WM_CHAR as the lifetime of values assigned to lastKeyDownConsumed is unbounded and WM_CHAR may be used by snippet or macro programs or features.

     

    Related

    Commit: [16e865]
    Commit: [b0355e]

  • Neil Hodgson

    Neil Hodgson - 2020-07-22
    • status: open --> closed
     
  • Neil Hodgson

    Neil Hodgson - 2020-07-22

    Committed representation with [b0355e].
    Changed IsControlCharacter with [16e865] but retained int argument as that is the convention defined by ctype.h for char classification functions.

    Did not change WM_CHAR as the lifetime of values assigned to lastKeyDownConsumed is unbounded and WM_CHAR may be used by snippet or macro programs or features.

     

    Related

    Commit: [16e865]
    Commit: [b0355e]


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.