Only delete lines under cursor if not `None`
							parent
							
								
									f7c0ee930a
								
							
						
					
					
						commit
						b734af6dd0
					
				|  | @ -219,19 +219,19 @@ class LineEditor(Struct): | ||||||
|         lines = self._order_lines.pop(uuid) |         lines = self._order_lines.pop(uuid) | ||||||
|         if lines: |         if lines: | ||||||
|             cursor = self.godw.get_cursor() |             cursor = self.godw.get_cursor() | ||||||
|  |             if cursor: | ||||||
|  |                 for line in lines: | ||||||
|  |                     # if hovered remove from cursor set | ||||||
|  |                     hovered = cursor._hovered | ||||||
|  |                     if line in hovered: | ||||||
|  |                         hovered.remove(line) | ||||||
| 
 | 
 | ||||||
|             for line in lines: |                     log.debug(f'deleting {line} with oid: {uuid}') | ||||||
|                 # if hovered remove from cursor set |                     line.delete() | ||||||
|                 hovered = cursor._hovered |  | ||||||
|                 if line in hovered: |  | ||||||
|                     hovered.remove(line) |  | ||||||
| 
 | 
 | ||||||
|                 log.debug(f'deleting {line} with oid: {uuid}') |                     # make sure the xhair doesn't get left off | ||||||
|                 line.delete() |                     # just because we never got a un-hover event | ||||||
| 
 |                     cursor.show_xhair() | ||||||
|                 # make sure the xhair doesn't get left off |  | ||||||
|                 # just because we never got a un-hover event |  | ||||||
|                 cursor.show_xhair() |  | ||||||
| 
 | 
 | ||||||
|         else: |         else: | ||||||
|             log.warning(f'Could not find line for {line}') |             log.warning(f'Could not find line for {line}') | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue