make typing echo more useful
This commit is contained in:
		| @@ -8,7 +8,8 @@ class command(): | |||||||
|           environment['screenData']['newCursor']['x'] == environment['screenData']['oldCursor']['x']: |           environment['screenData']['newCursor']['x'] == environment['screenData']['oldCursor']['x']: | ||||||
|             return environment |             return environment | ||||||
|         if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']].replace(" ","").replace("\n","").replace("\t","") == '': |         if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']].replace(" ","").replace("\n","").replace("\t","") == '': | ||||||
|             environment['runtime']['outputManager'].presentText(environment, "blank",True) |             pass | ||||||
|  |             #environment['runtime']['outputManager'].presentText(environment, "blank",True) | ||||||
|         else: |         else: | ||||||
|             environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']],True) |             environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']],True) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ class screen(): | |||||||
|         environment['screenData']['newCursor']['x'] = int( environment['screenData']['newContentBytes'][2]) |         environment['screenData']['newCursor']['x'] = int( environment['screenData']['newContentBytes'][2]) | ||||||
|         environment['screenData']['newCursor']['y'] = int( environment['screenData']['newContentBytes'][3]) |         environment['screenData']['newCursor']['y'] = int( environment['screenData']['newContentBytes'][3]) | ||||||
|         # analyze content |         # analyze content | ||||||
|         environment['screenData']['newContentText'] = str(environment['screenData']['newContentBytes'][4:][::2].decode("ascii", "replace")) |         environment['screenData']['newContentText'] = str(environment['screenData']['newContentBytes'][4:][::2].decode("CP1252", "replace")) | ||||||
|         environment['screenData']['newContentAttrib'] = environment['screenData']['newContentBytes'][5:][::2] |         environment['screenData']['newContentAttrib'] = environment['screenData']['newContentBytes'][5:][::2] | ||||||
|         environment['screenData']['newContentText'] = '\n'.join(self.textWrapper.wrap(environment['screenData']['newContentText'], ))[:-2] |         environment['screenData']['newContentText'] = '\n'.join(self.textWrapper.wrap(environment['screenData']['newContentText'], ))[:-2] | ||||||
|          |          | ||||||
| @@ -68,4 +68,5 @@ class screen(): | |||||||
|             diff = difflib.ndiff(" ".join(environment['screenData']['oldContentText'].split()), " ".join(environment['screenData']['newContentText'].split())) |             diff = difflib.ndiff(" ".join(environment['screenData']['oldContentText'].split()), " ".join(environment['screenData']['newContentText'].split())) | ||||||
|             environment['screenData']['newDelta'] = ''.join(x[2:] for x in diff if x.startswith('+ ')) |             environment['screenData']['newDelta'] = ''.join(x[2:] for x in diff if x.startswith('+ ')) | ||||||
|  |  | ||||||
|  |  | ||||||
|         return environment |         return environment | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user