aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.h
diff options
context:
space:
mode:
Diffstat (limited to 'reader.h')
-rw-r--r--reader.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/reader.h b/reader.h
index 77ee655b..0a92aa1d 100644
--- a/reader.h
+++ b/reader.h
@@ -25,45 +25,45 @@ class history_t;
/* Helper class for storing a command line */
class editable_line_t
{
- public:
-
+public:
+
/** The command line */
wcstring text;
-
+
/** The current position of the cursor in the command line */
size_t position;
-
+
const wcstring &get_text() const
{
return text;
}
-
+
/* Gets the length of the text */
size_t size() const
{
return text.size();
}
-
+
bool empty() const
{
return text.empty();
}
-
+
void clear()
{
text.clear();
position = 0;
}
-
+
wchar_t at(size_t idx)
{
return text.at(idx);
}
-
+
editable_line_t() : text(), position(0)
{
}
-
+
/* Inserts the string at the cursor position */
void insert_string(const wcstring &str);
};