mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-18 10:31:44 +02:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6752058922 | ||
![]() |
b965108dad | ||
![]() |
6bf0f36567 | ||
![]() |
69f1a70968 | ||
![]() |
47edfcac5e | ||
![]() |
c34599b954 | ||
![]() |
48b371c985 | ||
![]() |
47165e7b9d |
13
CHANGES.md
13
CHANGES.md
@@ -4,6 +4,19 @@ The Changelog
|
|||||||
History of changes in IdeaVim for the IntelliJ platform.
|
History of changes in IdeaVim for the IntelliJ platform.
|
||||||
|
|
||||||
|
|
||||||
|
0.39, 2014-12-03
|
||||||
|
----------------
|
||||||
|
|
||||||
|
A bugfix release.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* VIM-848 Show line numbers if they are enabled in the settings and there is
|
||||||
|
no `set number`
|
||||||
|
* VIM-702 Fix infinite loop on `s/$/\r/g`
|
||||||
|
* EA-63022 Don't update line numbers in the caret movement event listener
|
||||||
|
|
||||||
|
|
||||||
0.38, 2014-12-01
|
0.38, 2014-12-01
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
version-id:0.38
|
version-id:0.39
|
||||||
platform-version:135.0
|
platform-version:135.0
|
||||||
idea.download.url=http://download.jetbrains.com/idea/ideaIU-14.0.1.zip
|
idea.download.url=http://download.jetbrains.com/idea/ideaIU-14.0.1.zip
|
||||||
build.number=dev
|
build.number=dev
|
||||||
|
@@ -3,6 +3,10 @@
|
|||||||
<id>IdeaVIM</id>
|
<id>IdeaVIM</id>
|
||||||
<change-notes>
|
<change-notes>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
<p>0.39:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Various bug fixes</li>
|
||||||
|
</ul>
|
||||||
<p>0.38:</p>
|
<p>0.38:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Support for <code>:action</code> and <code>:actionlist</code> for executing arbitrary IDE actions</li>
|
<li>Support for <code>:action</code> and <code>:actionlist</code> for executing arbitrary IDE actions</li>
|
||||||
@@ -30,18 +34,6 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>Various bug fixes</li>
|
<li>Various bug fixes</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>0.33:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Support for <code>:map</code> key mapping commands</li>
|
|
||||||
<li>New keyboard shortcuts handler that doesn't require a separate keymap for Vim emulation</li>
|
|
||||||
<li>Support for <code>:source</code> command</li>
|
|
||||||
<li>Support for <code>:sort</code> command</li>
|
|
||||||
<li>Various bug fixes</li>
|
|
||||||
</ul>
|
|
||||||
<p>0.32:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Fixed API compatibility with IntelliJ platform builds 132.1052+</li>
|
|
||||||
</ul>
|
|
||||||
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
||||||
]]>
|
]]>
|
||||||
</change-notes>
|
</change-notes>
|
||||||
|
@@ -136,12 +136,27 @@ public class EditorGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateLineNumbers(@NotNull Editor editor) {
|
private void updateLineNumbers(@NotNull Editor editor) {
|
||||||
|
if (!EditorData.isFileEditor(editor)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final Options options = Options.getInstance();
|
final Options options = Options.getInstance();
|
||||||
final boolean relativeLineNumber = options.isSet(Options.RELATIVE_NUMBER);
|
final boolean relativeLineNumber = options.isSet(Options.RELATIVE_NUMBER);
|
||||||
final boolean lineNumber = options.isSet(Options.NUMBER);
|
final boolean lineNumber = options.isSet(Options.NUMBER);
|
||||||
|
|
||||||
final EditorSettings settings = editor.getSettings();
|
final EditorSettings settings = editor.getSettings();
|
||||||
settings.setLineNumbersShown(lineNumber && !relativeLineNumber);
|
final boolean showEditorLineNumbers = (EditorData.isLineNumbersShown(editor) || lineNumber) && !relativeLineNumber;
|
||||||
|
|
||||||
|
if (settings.isLineNumbersShown() ^ showEditorLineNumbers) {
|
||||||
|
// Update line numbers later since it may be called from a caret listener
|
||||||
|
// on the caret move and it may move the caret internally
|
||||||
|
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
settings.setLineNumbersShown(showEditorLineNumbers);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (relativeLineNumber) {
|
if (relativeLineNumber) {
|
||||||
final EditorGutter gutter = editor.getGutter();
|
final EditorGutter gutter = editor.getGutter();
|
||||||
|
@@ -375,6 +375,7 @@ public class SearchGroup {
|
|||||||
lastMatch = startoff;
|
lastMatch = startoff;
|
||||||
newpos = EditorHelper.offsetToCharacterPosition(editor, newend);
|
newpos = EditorHelper.offsetToCharacterPosition(editor, newend);
|
||||||
|
|
||||||
|
lnum += newpos.line - endpos.line;
|
||||||
line2 += newpos.line - endpos.line;
|
line2 += newpos.line - endpos.line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -75,6 +75,20 @@ public class SubstituteCommandTest extends VimTestCase {
|
|||||||
"one\n.two\n.three\n");
|
"one\n.two\n.three\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VIM-702 |:substitute|
|
||||||
|
public void testEndOfLineToNL() {
|
||||||
|
doTest("%s/$/\\r/g",
|
||||||
|
"<caret>one\ntwo\nthree\n",
|
||||||
|
"one\n\ntwo\n\nthree\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
// VIM-702 |:substitute|
|
||||||
|
public void testStartOfLineToNL() {
|
||||||
|
doTest("%s/^/\\r/g",
|
||||||
|
"<caret>one\ntwo\nthree\n",
|
||||||
|
"\none\n\ntwo\n\nthree\n");
|
||||||
|
}
|
||||||
|
|
||||||
private void doTest(final String command, String before, String after) {
|
private void doTest(final String command, String before, String after) {
|
||||||
myFixture.configureByText("a.java", before);
|
myFixture.configureByText("a.java", before);
|
||||||
typeText(commandToKeys(command));
|
typeText(commandToKeys(command));
|
||||||
|
Reference in New Issue
Block a user