]> Sergey Matveev's repositories - codecomm.git/blobdiff - plugin/codecomm.vim
Forcefully set noro for CodeCommCommenting window
[codecomm.git] / plugin / codecomm.vim
index 3a552be1c57d7b7eb35ac6ac2c773dcbc3e41633..9226b4239e57ad15f64cef2f2451e54feb8d997c 100644 (file)
@@ -43,8 +43,15 @@ function! s:CodeComm() range
         let ready = add(ready, fmted)
     endfor
     let ready = add(ready, "---------------------------------- >8 ----------------------------------")
+    " Place commented signs
+    sign define commented text=C texthl=Search
+    for linen in range(a:firstline, a:lastline)
+        let cmd = ":sign place " . linen . " line=" . linen
+        let cmd .= " name=commented buffer=" . bufnr("%")
+        execute cmd
+    endfor
     " Spawn a new small code commenting window nonbinded to file
-    new CodeCommCommenting
+    new +set\ noreadonly CodeCommCommenting
     setlocal noswapfile
     setlocal buftype=acwrite
     call append("^", ready)