Browse Source

Added box drawing characters for fortune / cowsay

See the following link for more info on box drawing characters:
https://en.wikipedia.org/wiki/Box-drawing_character
Steve Dignam 9 years ago
parent
commit
65d117764f
1 changed files with 5 additions and 4 deletions
  1. 5 4
      autoload/startify/fortune.vim

+ 5 - 4
autoload/startify/fortune.vim

@@ -119,13 +119,14 @@ endfunction
 " Function: s:draw_box {{{1
 function! s:draw_box(lines) abort
   let longest_line = max(map(copy(a:lines), 'len(v:val)'))
-  let topbottom = '*'. repeat('-', longest_line + 2) .'*'
-  let lines = [topbottom]
+  let top = '╭'. repeat('─', longest_line + 2) .'╮'
+  let bottom = '╰'. repeat('─', longest_line + 2) .'╯'
+  let lines = [top]
   for l in a:lines
     let offset = longest_line - len(l)
-    let lines += ['| '. l . repeat(' ', offset) .' |']
+    let lines += ['│ '. l . repeat(' ', offset) .' │']
   endfor
-  let lines += [topbottom]
+  let lines += [bottom]
   return lines
 endfunction