aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2016-03-25 18:04:14 +1100
committerNeil <nyamatongwe@gmail.com>2016-03-25 18:04:14 +1100
commit5fb6f88108fdade234c232257f006a404cd2306a (patch)
tree99a47e7e8ecce74b08f90b1cad55e6e8794b1d7f
parent3b027520fbf13b7d12fec09b323f8b5547ca7c46 (diff)
downloadscintilla-mirror-5fb6f88108fdade234c232257f006a404cd2306a.tar.gz
Define Position and invalidPosition inside the Sci namespace for internal use.
-rw-r--r--src/Position.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Position.h b/src/Position.h
index 4ef655263..120b92f62 100644
--- a/src/Position.h
+++ b/src/Position.h
@@ -1,6 +1,6 @@
// Scintilla source code edit control
/** @file Position.h
- ** Will define global type name Position in the Sci internal namespace.
+ ** Defines global type name Position in the Sci internal namespace.
**/
// Copyright 2015 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
@@ -8,14 +8,21 @@
#ifndef POSITION_H
#define POSITION_H
+/**
+ * A Position is a position within a document between two characters or at the beginning or end.
+ * Sometimes used as a character index where it identifies the character after the position.
+ */
+
namespace Sci {
-// After 3.6.0:
-// typedef int Position;
+typedef int Position;
// A later version (4.x) of this file may:
//#if defined(SCI_LARGE_FILE_SUPPORT)
-//typedef ptrdiff_t Position;
+//typedef std::ptrdiff_t Position;
+// or may allow runtime choice between different position sizes.
+
+const Position invalidPosition = -1;
}