Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for setting the caret and the selection layer #25

Merged
merged 2 commits into from
Oct 31, 2022

Conversation

darssy
Copy link
Contributor

@darssy darssy commented Oct 30, 2022

Added Layer enum that groups SC_LAYER_BASE, SC_LAYER_UNDER_TEXT and SC_LAYER_OVER_TEXT. Added properties SelectionLayer and CaretLineLayer in Scintilla control to set the layer of the text selection and the layer of the currently highlighted line when CaretLineVisible is set.

Note: one thing that I couldn't get around is the default value of CaretLineLayer property. While for a newly created control it reports Base or 0, the behavior is as if OverText (or 2) is selected. This might create confusion but I'm not sure if there is anything to be done as, if there is a bug, that seems to be in the native control side. Perhaps adding CaretLineLayer = Layer.Base in the constructor might be enough?

Fixes #24

Copy link
Contributor

@VPKSoft VPKSoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One missing enum header comment - good stuff otherwise 🙂

Shared/Layer.cs Outdated
namespace ScintillaNET;

/// <summary>
///
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this missing summary could be added. I can add it too after work, otherwise looks great.👍

@darssy darssy temporarily deployed to NuGet October 31, 2022 04:33 Inactive
@darssy
Copy link
Contributor Author

darssy commented Oct 31, 2022

Oh no worries, I just added it myself. 🙂

@darssy darssy temporarily deployed to NuGet October 31, 2022 14:43 Inactive
@VPKSoft VPKSoft merged commit cf59dbc into desjarlais:master Oct 31, 2022
@darssy darssy deleted the line-layer-api branch October 31, 2022 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for SCI_SETSELECTIONLAYER in order to streamline current line highlighting?
2 participants