The code is written with the assumption that gutters that are not the line number gutter have a constant width. You could dynamically change the CSS class for your gutter, or give it a different class, and then update the gutters
option to force a recomputation of gutter width, but that’s all I can suggest.