Skip to content

Commit

Permalink
Bugfix for attempt to perform arithmetic on field 'wxMOD_RAW_CONTROL'…
Browse files Browse the repository at this point in the history
… (a nil value).

Fix for:
	Lua: Error while running chunk
	src/editor/editor.lua:664: attempt to perform arithmetic on field 'wxMOD_RAW_CONTROL' (a nil value)
	stack traceback:
		src/editor/editor.lua:664: in function <src/editor/editor.lua:649>
		[C]: in function 'MainLoop'
		src/main.lua:442: in main chunk
		[C]: ?

which happens with 0.361 using Linux. This behaviour could also be present using Windows though unverified.
  • Loading branch information
samueldr committed Apr 14, 2013
1 parent 0d268a0 commit 8c8a2d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/editor.lua
Expand Up @@ -660,8 +660,8 @@ function CreateEditor()
if event:ShiftDown() -- mark selection and scroll to caret
then editor:SetCurrentPos(pos) editor:EnsureCaretVisible()
else editor:GotoPos(pos) end
elseif mod == wx.wxMOD_RAW_CONTROL and keycode == wx.WXK_PAGEUP
or mod == (wx.wxMOD_RAW_CONTROL + wx.wxMOD_SHIFT) and keycode == wx.WXK_TAB then
elseif mod == wx.wxMOD_RAW_CONTROL and (keycode == wx.WXK_PAGEUP
or mod == (wx.wxMOD_RAW_CONTROL + wx.wxMOD_SHIFT) and keycode == wx.WXK_TAB) then
if notebook:GetSelection() == first
then notebook:SetSelection(last)
else notebook:AdvanceSelection(false) end
Expand Down

0 comments on commit 8c8a2d9

Please sign in to comment.