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