You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mi...@apache.org on 2016/07/18 05:50:22 UTC
zeppelin git commit: [MINOR] Blocking the minus cursor value.
Repository: zeppelin
Updated Branches:
refs/heads/branch-0.6 f2b46fedb -> a42d5bab4
[MINOR] Blocking the minus cursor value.
### What is this PR for?
This PR is for blocking minus cursor value on the paragraph.
If we put the ```ctrl+.``` for auto completion on the interpreter name, the cursor value to be minus so it occurs ```java.lang.StringIndexOutOfBoundsException```.
### What type of PR is it?
Improvement | Refactoring
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: astroshim <hs...@nflabs.com>
Closes #1090 from astroshim/feat/fixCursorValue and squashes the following commits:
b993f2b [astroshim] check cursor value.
(cherry picked from commit a7bb45393232f0e8638942fcf78518acbcc2a8f7)
Signed-off-by: Mina Lee <mi...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/a42d5bab
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/a42d5bab
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/a42d5bab
Branch: refs/heads/branch-0.6
Commit: a42d5bab40bc14fd0ea183615141239ceef65ca5
Parents: f2b46fe
Author: astroshim <hs...@nflabs.com>
Authored: Mon Jun 27 14:05:58 2016 +0900
Committer: Mina Lee <mi...@apache.org>
Committed: Mon Jul 18 14:50:15 2016 +0900
----------------------------------------------------------------------
.../src/main/java/org/apache/zeppelin/notebook/Paragraph.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a42d5bab/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
index 4e02fb1..bc53887 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
@@ -208,7 +208,7 @@ public class Paragraph extends Job implements Serializable, Cloneable {
public List<InterpreterCompletion> completion(String buffer, int cursor) {
String replName = getRequiredReplName(buffer);
- if (replName != null) {
+ if (replName != null && cursor > replName.length()) {
cursor -= replName.length() + 1;
}
String body = getScriptBody(buffer);