Table of Contents

Enum ModificationFlags

Namespace
Npp.DotNet.Plugin
Assembly
Npp.DotNet.Plugin.dll

The ModificationType field of a ScNotification. These are defined as a bit mask to make it easy to specify which notifications are wanted. One bit is set from each of SC_MOD_* and SC_PERFORMED_*. (Scintilla feature SC_MOD_)

[Flags]
public enum ModificationFlags

Fields

NPP_DEFAULT_SC_MOD_MASK = SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT | SC_PERFORMED_UNDO | SC_PERFORMED_REDO | SC_MOD_CHANGEINDICATOR

Used with DefaultModificationFlagsChanged() to determine if the default ModificationFlags have been changed by another plugin.

Added in 8.7.7

SC_LASTSTEPINUNDOREDO = 256

This is the final step in an Undo or Redo transaction.

SC_MODEVENTMASKALL = SC_MOD_CHANGESTYLE | SC_MOD_CHANGEFOLD | SC_PERFORMED_USER | SC_MULTISTEPUNDOREDO | SC_LASTSTEPINUNDOREDO | SC_MOD_CHANGEMARKER | SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE | SC_MULTILINEUNDOREDO | SC_STARTACTION | NPP_DEFAULT_SC_MOD_MASK | SC_MOD_CHANGELINESTATE | SC_MOD_CHANGEMARGIN | SC_MOD_CHANGEANNOTATION | SC_MOD_CONTAINER | SC_MOD_LEXERSTATE | SC_MOD_INSERTCHECK | SC_MOD_CHANGETABSTOPS | SC_MOD_CHANGEEOLANNOTATION

This is a mask for all valid flags. This is the default mask state set by SCI_SETMODEVENTMASK.

SC_MOD_BEFOREDELETE = 2048

Text is about to be deleted from the document.

Fields: Position, Length

SC_MOD_BEFOREINSERT = 1024

Text is about to be inserted into the document.

Fields: Position. If performed by user (i.e., ModificationType & SC_PERFORMED_USER == SC_PERFORMED_USER) then also TextPointer in bytes and Length in bytes

SC_MOD_CHANGEANNOTATION = 131072

An annotation has changed.

Fields: LineNumber

SC_MOD_CHANGEEOLANNOTATION = 4194304

An EOL annotation has changed.

Fields: LineNumber

SC_MOD_CHANGEFOLD = 8

A folding change has occurred.

Fields: LineNumber, FoldLevelNow, FoldLevelPrev

SC_MOD_CHANGEINDICATOR = 16384

An indicator has been added or removed from a range of text.

Fields: Position, Length

SC_MOD_CHANGELINESTATE = 32768

A line state has changed because SCI_SETLINESTATE was called.

Fields: LineNumber

SC_MOD_CHANGEMARGIN = 65536

A text margin has changed.

Fields: LineNumber

SC_MOD_CHANGEMARKER = 512

One or more markers has changed in a line.

Fields: LineNumber

SC_MOD_CHANGESTYLE = 4

A style change has occurred.

Fields: Position, Length

SC_MOD_CHANGETABSTOPS = 2097152

The explicit tab stops on a line have changed because SCI_CLEARTABSTOPS or SCI_ADDTABSTOP was called.

Fields: LineNumber

SC_MOD_CONTAINER = 262144

This is set on for actions that the container stored into the undo stack with SCI_ADDUNDOACTION.

Fields: Token

SC_MOD_DELETETEXT = 2

Text has been removed from the document.

Fields: Position, Length, TextPointer, LinesAdded

SC_MOD_INSERTCHECK = 1048576

Text is about to be inserted. The handler may change the text being inserted by calling SCI_CHANGEINSERTION. No other modifications may be made in this handler.

Fields: Position, Length, TextPointer

SC_MOD_INSERTTEXT = 1

Text has been inserted into the document.

Fields: Position, Length, TextPointer, LinesAdded

SC_MOD_LEXERSTATE = 524288

The internal state of a lexer has changed over a range.

Fields: Position, Length

SC_MOD_NONE = 0

Base value with no fields valid. Will not occur but is useful in tests.

SC_MULTILINEUNDOREDO = 4096

This is part of an Undo or Redo with multi-line changes.

SC_MULTISTEPUNDOREDO = 128

This is part of a multi-step Undo or Redo transaction.

SC_PERFORMED_REDO = 64

Information: this was the result of a Redo.

SC_PERFORMED_UNDO = 32

Information: this was the result of an Undo.

SC_PERFORMED_USER = 16

Information: the operation was done by the user.

SC_STARTACTION = 8192

This is set on a SC_PERFORMED_USER action when it is the first or only step in an undo transaction. This can be used to integrate the Scintilla undo stack with an undo stack in the container application by adding a Scintilla action to the container's stack for the currently opened container transaction or to open a new container transaction if there is no open container transaction.