Commits

Tamas Kovacs committed 5594801

Replaced 'readonly' with 'nomodifiable' for SLDB, Inspect, Threads buffers

Comments (0)

Files changed (2)

ftplugin/slimv.vim

 " slimv.vim:    The Superior Lisp Interaction Mode for VIM
-" Version:      0.9.9
-" Last Change:  10 Nov 2012
+" Version:      0.9.10
+" Last Change:  10 Dec 2012
 " Maintainer:   Tamas Kovacs <kovisoft at gmail dot com>
 " License:      This file is placed in the public domain.
 "               No warranty, express or implied.
     endif
     setlocal buftype=nofile
     setlocal noswapfile
-    setlocal noreadonly
+    setlocal modifiable
 endfunction
 
 " Go to the end of the screen line
 
 " End updating an otherwise readonly buffer
 function SlimvEndUpdate()
-    setlocal readonly
+    setlocal nomodifiable
     setlocal nomodified
 endfunction
 
     if exists( 'b:inspect_pos' )
         unlet b:inspect_pos
     endif
-    setlocal noreadonly
+    setlocal modifiable
     silent! %d
     call SlimvEndUpdate()
     if a:force
 " Quit Threads
 function SlimvQuitThreads()
     " Clear the contents of the Threads buffer
-    setlocal noreadonly
+    setlocal modifiable
     silent! %d
     call SlimvEndUpdate()
     b #
 " Quit Sldb
 function SlimvQuitSldb()
     " Clear the contents of the Sldb buffer
-    setlocal noreadonly
+    setlocal modifiable
     silent! %d
     call SlimvEndUpdate()
     b #
 
 " Write help text to current buffer at given line
 function SlimvHelp( line )
-    setlocal noreadonly
+    setlocal modifiable
     if exists( 'b:help_shown' )
         let help = b:help
     else
     endif
     let b:help_line = a:line
     call append( b:help_line, help )
-    call SlimvEndUpdate()
 endfunction
 
 " Toggle help
         let lines = 1
         let b:help_shown = 1
     endif
-    setlocal noreadonly
+    setlocal modifiable
     execute ":" . (b:help_line+1) . "," . (b:help_line+lines) . "d"
     call SlimvHelp( b:help_line )
+    call SlimvEndUpdate()
 endfunction
 
 " Open SLDB buffer and place cursor on the given frame
 
 " Make a fold at the cursor point in the current buffer
 function SlimvMakeFold()
-    setlocal noreadonly
+    setlocal modifiable
     normal! o    }}}kA {{{0
-    setlocal readonly
+    setlocal nomodifiable
 endfunction
 
 " Handle insert mode 'Enter' keypress in the REPL buffer

ftplugin/swank.py

 #
 # SWANK client for Slimv
 # swank.py:     SWANK client code for slimv.vim plugin
-# Version:      0.9.9
-# Last Change:  07 Nov 2012
+# Version:      0.9.10
+# Last Change:  10 Dec 2012
 # Maintainer:   Tamas Kovacs <kovisoft at gmail dot com>
 # License:      This file is placed in the public domain.
 #               No warranty, express or implied.
 
     if type(pcont[0]) != list:
         return
+    vim.command('setlocal modifiable')
     buf = vim.current.buffer
     help_lines = int( vim.eval('exists("b:help_shown") ? len(b:help) : 1') )
     pos = help_lines + inspect_lines
     else:
         # No ore entries left
         vim.command("let b:inspect_more=0")
+    vim.command('call SlimvEndUpdate()')
 
 def swank_parse_inspect(struct):
     """
     global inspect_newline
 
     vim.command('call SlimvOpenInspectBuffer()')
+    vim.command('setlocal modifiable')
     buf = vim.current.buffer
     title = parse_plist(struct, ':title')
     vim.command('let b:inspect_title="' + title + '"')
     Parse the SLDB output
     """
     vim.command('call SlimvOpenSldbBuffer()')
+    vim.command('setlocal modifiable')
     buf = vim.current.buffer
     [thread, level, condition, restarts, frames, conts] = struct[1:7]
     buf[:] = [l for l in (unquote(condition[0]) + "\n" + unquote(condition[1])).splitlines()]
 
 def swank_parse_list_threads(tl):
     vim.command('call SlimvOpenThreadsBuffer()')
+    vim.command('setlocal modifiable')
     buf = vim.current.buffer
     buf[:] = ['Threads in pid '+pid, '--------------------']
     vim.command('call SlimvHelp(2)')
     Parse frame call output
     """
     vim.command('call SlimvGotoFrame(' + action.data + ')')
+    vim.command('setlocal modifiable')
     buf = vim.current.buffer
     win = vim.current.window
     line = win.cursor[0]
     'Well, let's say a missing feature: source locations are currently not available for code loaded as source.'
     """
     vim.command('call SlimvGotoFrame(' + action.data + ')')
+    vim.command('setlocal modifiable')
     buf = vim.current.buffer
     win = vim.current.window
     line = win.cursor[0]
     """
     frame_num = action.data
     vim.command('call SlimvGotoFrame(' + frame_num + ')')
+    vim.command('setlocal modifiable')
     buf = vim.current.buffer
     win = vim.current.window
     line = win.cursor[0]