Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 28de33ce5 -> b6f9d997f


ZEPPELIN-140 Send complete buffer to interpreter.completion

Author: Neville Li <[email protected]>

Closes #131 from nevillelyh/neville/ZEPPELIN-140 and squashes the following 
commits:

329b5f9 [Neville Li] ZEPPELIN-140 Send complete buffer to interpreter.completion


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/b6f9d997
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/b6f9d997
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/b6f9d997

Branch: refs/heads/master
Commit: b6f9d997fe620751d1d805ed75812abc4bea5e3d
Parents: 28de33c
Author: Neville Li <[email protected]>
Authored: Mon Jun 29 22:21:30 2015 -0400
Committer: Lee moon soo <[email protected]>
Committed: Wed Jul 1 14:20:20 2015 -0700

----------------------------------------------------------------------
 zeppelin-web/app/scripts/controllers/paragraph.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/b6f9d997/zeppelin-web/app/scripts/controllers/paragraph.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/app/scripts/controllers/paragraph.js 
b/zeppelin-web/app/scripts/controllers/paragraph.js
index e332e60..7cf211e 100644
--- a/zeppelin-web/app/scripts/controllers/paragraph.js
+++ b/zeppelin-web/app/scripts/controllers/paragraph.js
@@ -441,13 +441,14 @@ angular.module('zeppelinWebApp')
           getCompletions : function(editor, session, pos, prefix, callback) {
               if (!$scope.editor.isFocused() ){ return;}
 
-              var buf = session.getTextRange(new Range(0, 0, pos.row, 
pos.column));
+              var pos = session.getTextRange(new Range(0, 0, pos.row, 
pos.column)).length;
+              var buf = session.getValue();
               $rootScope.$emit('sendNewEvent', {
                   op : 'COMPLETION',
                   data : {
                       id : $scope.paragraph.id,
                       buf : buf,
-                      cursor : buf.length
+                      cursor : pos
                   }
               });
 

Reply via email to