src/Tools/jEdit/src/completion_popup.scala
changeset 55914 c5b752d549e3
parent 55850 7f229b0212fe
child 55978 56645c447ee9
     1.1 --- a/src/Tools/jEdit/src/completion_popup.scala	Wed Mar 05 09:59:48 2014 +0100
     1.2 +++ b/src/Tools/jEdit/src/completion_popup.scala	Wed Mar 05 13:11:08 2014 +0100
     1.3 @@ -114,7 +114,9 @@
     1.4              before_caret_range(rendering).try_restrict(line_range) match {
     1.5                case Some(range) if !range.is_singularity =>
     1.6                  rendering.completion_names(range) match {
     1.7 -                  case Some(names) => Some(names.range)
     1.8 +                  case Some(names) =>
     1.9 +                    if (names.no_completion) None
    1.10 +                    else Some(names.range)
    1.11                    case None =>
    1.12                      syntax_completion(false, Some(rendering)) match {
    1.13                        case Some(result) => Some(result.range)
    1.14 @@ -232,12 +234,15 @@
    1.15              case Some(doc_view) =>
    1.16                val rendering = doc_view.get_rendering()
    1.17                rendering.completion_names(before_caret_range(rendering)) match {
    1.18 +                case Some(names) =>
    1.19 +                  if (names.no_completion)
    1.20 +                    Some(Completion.Result.empty(names.range))
    1.21 +                  else
    1.22 +                    JEdit_Lib.try_get_text(buffer, names.range) match {
    1.23 +                      case Some(original) => names.complete(history, decode, original)
    1.24 +                      case None => None
    1.25 +                    }
    1.26                  case None => None
    1.27 -                case Some(names) =>
    1.28 -                  JEdit_Lib.try_get_text(buffer, names.range) match {
    1.29 -                    case Some(original) => names.complete(history, decode, original)
    1.30 -                    case None => None
    1.31 -                  }
    1.32                }
    1.33              case None => None
    1.34            }