/// <summary>
        /// Set the persisted zoomlevel.
        /// </summary>
        /// <param name="options">The <see cref="IEditorOptions"/>.</param>
        /// <param name="zoomLevel">The new zoom level. This value will be
        /// clamped to fit between <see cref="MinZoom"/>
        /// and <see cref="MaxZoom"/></param>
        public static void SetZoomLevel(this IEditorOptions options, double zoomLevel)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            options.SetOptionValue(
                DefaultTextViewOptions.ZoomLevelId,
                Math.Min(options.MaxZoom(), Math.Max(options.MinZoom(), zoomLevel)));
        }