aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cmdline.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-02-11 06:01:25 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-02-11 06:01:25 +0100
commitd24bc4a3670c253fad5bee380c35e8a45dd283a2 (patch)
tree03f8ca53f2adf741936c219e7af1539e62250738 /src/cmdline.cpp
parenta2956aa85f1ba63dc45166d6418be8d50a298a10 (diff)
downloadsciteco-d24bc4a3670c253fad5bee380c35e8a45dd283a2.tar.gz
implemented support for different indention styles
* the ^I command was altered to insert indention characters rather than plain tabs always. * The <TAB> immediate editing command was added for all insertion arguments (I, ^I but also FR and FS) * documentation was extended for a discussion of indention
Diffstat (limited to 'src/cmdline.cpp')
-rw-r--r--src/cmdline.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cmdline.cpp b/src/cmdline.cpp
index 39cec52..dc03d9c 100644
--- a/src/cmdline.cpp
+++ b/src/cmdline.cpp
@@ -219,7 +219,17 @@ process_edit_cmd(gchar key)
break;
case '\t':
- if (States::is_file()) {
+ if (States::is_insertion()) {
+ if (!interface.ssm(SCI_GETUSETABS)) {
+ gint len = interface.ssm(SCI_GETTABWIDTH);
+
+ len -= interface.ssm(SCI_GETCOLUMN,
+ interface.ssm(SCI_GETCURRENTPOS)) % len;
+
+ memset(insert, ' ', len);
+ insert[len] = '\0';
+ }
+ } else if (States::is_file()) {
*insert = '\0';
if (interface.popup_is_shown()) {
/* cycle through popup pages */