node/lib/metasm/metasm/gui/dasm_main.rb
def focus_addr_autocomplete(v, show_alt=true)
		if not focus_addr(v, nil, true)
			labels = @dasm.prog_binding.map { |k, vv|
				[k, Expression[@dasm.normalize(vv)]] if k.downcase.include? v.downcase
			}.compact
			case labels.length
			when 0; focus_addr(v)
			when 1; focus_addr(labels[0][0])
			else
				if labels.all? { |k, vv| vv == labels[0][1] }
					focus_addr(labels[0][0])
				elsif show_alt
					labels.unshift ['name', 'addr']
					listwindow("list of labels", labels) { |i| focus_addr i[1] }
				end
			end
		end
	end
# same as focus_addr, also understands partial label names
# if the partial part is ambiguous, show a listwindow with all matches (if show_alt)
same as focus_addr, also understands partial label names
if the partial part is ambiguous, show a listwindow with all matches (if show_alt)
same as focus_addr also understands partial label names if the partial part is ambiguous show a listwindow with all matches ( if show_alt )
def focus_addr_autocomplete(v, show_alt=true)
		if not focus_addr(v, nil, true)
			labels = @dasm.prog_binding.map { |k, vv|
				[k, Expression[@dasm.normalize(vv)]] if k.downcase.include? v.downcase
			}.compact
			case labels.length
			when 0; focus_addr(v)
			when 1; focus_addr(labels[0][0])
			else
				if labels.all? { |k, vv| vv == labels[0][1] }
					focus_addr(labels[0][0])
				elsif show_alt
					labels.unshift ['name', 'addr']
					listwindow("list of labels", labels) { |i| focus_addr i[1] }
				end
			end
		end
	end
def focus_addr_autocomplete ( v , show_alt = true ) if not focus_addr ( v , nil , true ) labels = @dasm . prog_binding . map { | k , vv | [ k , Expression [ @dasm . normalize ( vv ) ] ] if k . downcase . include? v . downcase } . compact case labels . length when 0 ; focus_addr ( v ) when 1 ; focus_addr ( labels [ 0 ] [ 0 ] ) else if labels . all? { | k , vv | vv == labels [ 0 ] [ 1 ] } focus_addr ( labels [ 0 ] [ 0 ] ) elsif show_alt labels . unshift [ 'name' , 'addr' ] listwindow ( "list of labels" , labels ) { | i | focus_addr i [ 1 ] } end end end end
same as focus_addr, also understands partial label names
if the partial part is ambiguous, show a listwindow with all matches (if show_alt)
same as focus_addr also understands partial label names if the partial part is ambiguous show a listwindow with all matches ( if show_alt )
v
show_alt