diff runtime/autoload/csscomplete.vim @ 14249:4543777545a3

Updated runtime and language files. commit https://github.com/vim/vim/commit/6dc819b1299e1d9f99303568772ade544d5c1322 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 3 16:42:19 2018 +0200 Updated runtime and language files.
author Christian Brabandt <cb@256bit.org>
date Tue, 03 Jul 2018 16:45:06 +0200
parents 41768bcebc9b
children 11b656e74444
line wrap: on
line diff
--- a/runtime/autoload/csscomplete.vim
+++ b/runtime/autoload/csscomplete.vim
@@ -4,7 +4,7 @@
 "           plus CSS Speech Module <http://www.w3.org/TR/css3-speech/>
 " Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
 " Original Author: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2016 Jan 11
+" Last Change: 2018 Jul 02
 
 let s:values = split("all additive-symbols align-content align-items align-self animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip clip-path color columns column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cue cue-before cue-after cursor direction display empty-cells fallback filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-position grid-auto-rows grid-column grid-column-start grid-column-end grid-row grid-row-start grid-row-end grid-template grid-template-areas grid-template-rows grid-template-columns height hyphens image-rendering image-resolution image-orientation ime-mode inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top marks mask mask-type max-block-size max-height max-inline-size max-width max-zoom min-block-size min-height min-inline-size min-width min-zoom mix-blend-mode negative object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y pad padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside pause-before pause-after pause perspective perspective-origin pointer-events position prefix quotes range resize rest rest-before rest-after right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-points-x scroll-snap-points-y scroll-snap-type scroll-snap-type-x scroll-snap-type-y shape-image-threshold shape-margin shape-outside speak speak-as suffix symbols system table-layout tab-size text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unicode-range user-zoom vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-rate voice-range voice-stress voice-volume white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom")
 
@@ -19,7 +19,6 @@ function! csscomplete#CompleteCSS(findst
     while start >= 0 && line[start - 1] =~ '\%(\k\|-\)'
       let start -= 1
     endwhile
-    let b:after = line[compl_begin :]
     let b:compl_context = line[0:compl_begin]
     return start
   endif
@@ -37,11 +36,14 @@ function! csscomplete#CompleteCSS(findst
   " 5. if @ complete at-rule
   " 6. if ! complete important
   if exists("b:compl_context")
+    let line = getline('.')
+    let compl_begin = col('.') - 2
+    let after = line[compl_begin:]
     let line = b:compl_context
-    let after = b:after
     unlet! b:compl_context
   else
     let line = a:base
+    let after = ''
   endif
 
   let res = []