summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-02-27 22:19:37 +0000
committerMaxime Coste <frrrwww@gmail.com>2014-03-02 01:06:05 +0000
commit0cd82d0ebe8c61b454eb7c0f196b2b799ef8d263 (patch)
treeefa5f2dc84e706660e75c1abb62e7b1435b19d4e
parent6585000b6656b37255f64bcb1d1f8fa5a162f37b (diff)
Rename align indent to more correct copy indent
-rw-r--r--README.asciidoc2
-rw-r--r--src/normal.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/README.asciidoc b/README.asciidoc
index 892a7e0c..0821ba66 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -208,7 +208,7 @@ Changes
* _r_: replace each character with the next entered one
* _&_: align selection, align the cursor of selections by inserting
spaces before the first character of the selection
- * _alt-&_: align indent, copy the indentation of the main selection
+ * _alt-&_: copy indent, copy the indentation of the main selection
(or the count one if a count is given) to all other ones
* _`_: to lower case
diff --git a/src/normal.cc b/src/normal.cc
index 93b8bb2c..7972fa56 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -1071,7 +1071,7 @@ void align(Context& context, int)
}
}
-void align_indent(Context& context, int selection)
+void copy_indent(Context& context, int selection)
{
auto& buffer = context.buffer();
auto& selections = context.selections();
@@ -1084,7 +1084,7 @@ void align_indent(Context& context, int selection)
if (selection > selections.size())
throw runtime_error("invalid selection index");
if (selection == 0)
- selection = context.selections().main_index() + 1;
+ selection = context.selections().main_index() + 1;
const String& line = buffer[selections[selection-1].min().line];
auto it = line.begin();
@@ -1340,7 +1340,7 @@ KeyMap keymap =
{ alt('`'), for_each_char<swap_case> },
{ '&', align },
- { alt('&'), align_indent },
+ { alt('&'), copy_indent },
{ Key::Left, move<CharCount, Backward> },
{ Key::Down, move<LineCount, Forward> },