def on_modified(self, view):
		if self.IsValidScope(view):
			settings = SublimePapyrus.GetSettings()

			global SUBLIME_VERSION
			if SUBLIME_VERSION >= 3070 and settings.get("tooltip_function_parameters", True):
				if self.linterRunning:
					return
				elif self.completionRunning:
					return
				global cacheLock
				global lex
				global syn
				global sem
				with cacheLock:
					locations = [view.sel()[0].begin()]
					prefix = view.word(locations[0])
					line, column = view.rowcol(locations[0])
					line += 1
					lineString = view.substr(sublime.Region(view.line(locations[0]).begin(), locations[0]-len(prefix))).strip()
					bufferID = view.buffer_id()
					if bufferID:
						currentScript = self.GetScript(bufferID)
						if currentScript:
							try:
								sem.GetContext(currentScript, line)
							except Linter.FunctionDefinitionCancel as e:
								tokens = []
								try:
									for token in lex.Process(lineString):
										if token.type != lex.NEWLINE:
											tokens.append(token)
									if tokens and tokens[-1].type != lex.COMMENT_LINE:
										try:
											syn.Process(tokens)
										except Linter.ExpectedIdentifierError as f:
											if tokens[-1].type != lex.OP_DOT:
												stack = syn.stack[:]
												arguments = []
												for item in reversed(stack):
													if item.type == sem.NODE_FUNCTIONCALLARGUMENT:
														arguments.insert(0, stack.pop())
													elif item.type == sem.LEFT_PARENTHESIS:
														break
												stackLength = len(stack)
												func = None
												if stackLength >= 2 and stack[-2].type == sem.IDENTIFIER:
													name = stack[-2].value.upper()
													if stackLength >= 4 and stack[-3].type == sem.OP_DOT:
														try:
															result = sem.NodeVisitor(stack[-4])
															if result.type != sem.KW_SELF:
																try:
																	script = sem.GetCachedScript(result.type)
																	func = script.functions.get(name, None)
																except Linter.SemanticError as e:
																	return
															else:
																for scope in reversed(e.functions):
																	func = scope.get(name, None)
																	if func:
																		break
														except Linter.SemanticError as e:
															return
													else:
														for scope in reversed(e.functions):
															func = scope.get(name, None)
															if func:
																break
														for imp in e.imports:
															script = sem.GetCachedScript(imp)
															temp = script.functions.get(name, None)
															if temp:
																if func:
																	func = None
																else:
																	func = temp
																break
												if func and func.data.parameters:
													self.ShowFunctionInfo(view, tokens, func, len(arguments))
										except Linter.SyntacticError as f:
											pass
								except Linter.LexicalError as f:
									pass
							except Linter.SemanticError as e:
								pass

			if settings and settings.get("linter_on_modified", True):
				self.QueueLinter(view)
dataset/ETHPy150Open Kapiainen/SublimePapyrus/Source/Modules/Skyrim/Plugin.py/EventListener.on_modified/original