See #22757 (dist): Fix repaint after import and delete point (patch by kolesar, modified)
Beyond fixing the repaint after import and delete point, this also fixes some lint issues.