function setHScrollValue() {
		if (appSettings.value.textWrap || preventScrollbarH) return;
		const session = editor.getSession();
		const scrollLeft = session.getScrollLeft();

		if (scrollLeft === lastScrollLeft) return;

		const editorWidth = getEditorWidth(editor);
		const factor = (scrollLeft / editorWidth).toFixed(2);

		lastScrollLeft = scrollLeft;
		$hScrollbar.value = factor;
		editor._emit("scroll", "horizontal");
	}
Sets scrollbars value based on the editor's scroll position.