node/lib/metasm/metasm/gui/dasm_decomp.rb
# hint that the caret moved
# redraws the caret, change the hilighted word, redraw if needed
hint that the caret moved
redraws the caret, change the hilighted word, redraw if needed
hint that the caret moved redraws the caret change the hilighted word redraw if needed
def update_caret
		redraw if @caret_x < @view_x or @caret_x >= @view_x + @cwidth or @caret_y < @view_y or @caret_y >= @view_y + @cheight
		invalidate_caret(@oldcaret_x-@view_x, @oldcaret_y-@view_y)
		invalidate_caret(@caret_x-@view_x, @caret_y-@view_y)
		@oldcaret_x, @oldcaret_y = @caret_x, @caret_y
		redraw if update_hl_word(@line_text[@caret_y], @caret_x, :c)
	end
def update_caret redraw if @caret_x < @view_x or @caret_x >= @view_x + @cwidth or @caret_y < @view_y or @caret_y >= @view_y + @cheight invalidate_caret ( @oldcaret_x - @view_x , @oldcaret_y - @view_y ) invalidate_caret ( @caret_x - @view_x , @caret_y - @view_y ) @oldcaret_x , @oldcaret_y = @caret_x , @caret_y redraw if update_hl_word ( @line_text [ @caret_y ] , @caret_x , :c ) end
hint that the caret moved
redraws the caret, change the hilighted word, redraw if needed
hint that the caret moved redraws the caret change the hilighted word redraw if needed